Skip to content

Commit e4a02d6

Browse files
authored
Use extension_loaded instead of function_exists (#233)
1 parent 3cf8991 commit e4a02d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Swoole/SwooleExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ class SwooleExtension
99
/**
1010
* Determine if the Swoole extension is installed.
1111
*
12-
* @return int
12+
* @return bool
1313
*/
1414
public function isInstalled(): bool
1515
{
16-
return function_exists('swoole_cpu_num');
16+
return extension_loaded('swoole');
1717
}
1818

1919
/**

0 commit comments

Comments
 (0)