extension_loaded

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.');

        }
            $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.');

        }
    public function createLoop()

    {

        if (
'Linux' === PHP_OS && !extension_loaded('posix')) {

            
$this->markTestSkipped('libevent tests skipped on linux due to linux epoll issues.');

        }
    protected function tearDownSignalHandlers()

    {

        
parent::tearDown();

        if (
strncmp($this->getName(false), 'testSignal'10) === && extension_loaded('pcntl')) {

            
$this->resetSignalHandlers();

        }

    }
{

    public function 
createLoop()

    {

        if (!
extension_loaded('event')) {

            
$this->markTestSkipped('ext-event tests skipped because ext-event is not installed.');

        }