extension_loaded
reactphp/event-loop
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find out whether an extension is loaded
extension_loaded
(
string $extension
):
bool
{
public function
createLoop
(
$readStreamCompatible
=
false
)
{
if (
'Linux'
===
PHP_OS
&& !
extension_loaded
(
'posix'
)) {
$this
->
markTestSkipped
(
'libevent tests skipped on linux due to linux epoll issues.'
);
}
tests/ExtEventLoopTest.php
$this
->
markTestSkipped
(
'libevent tests skipped on linux due to linux epoll issues.'
);
}
if (!
extension_loaded
(
'event'
)) {
$this
->
markTestSkipped
(
'ext-event tests skipped because ext-event is not installed.'
);
}
tests/ExtEventLoopTest.php
public function
createLoop
()
{
if (
'Linux'
===
PHP_OS
&& !
extension_loaded
(
'posix'
)) {
$this
->
markTestSkipped
(
'libevent tests skipped on linux due to linux epoll issues.'
);
}
tests/ExtLibeventLoopTest.php
protected function
tearDownSignalHandlers
()
{
parent
::
tearDown
();
if (
strncmp
(
$this
->
getName
(
false
),
'testSignal'
,
10
) ===
0
&&
extension_loaded
(
'pcntl'
)) {
$this
->
resetSignalHandlers
();
}
}
tests/StreamSelectLoopTest.php
{
public function
createLoop
()
{
if (!
extension_loaded
(
'event'
)) {
$this
->
markTestSkipped
(
'ext-event tests skipped because ext-event is not installed.'
);
}
tests/Timer/ExtEventTimerTest.php