1--TEST-- 2dl() returns false when disabled via INI settings 3--CREDITS-- 4Tom Van Herreweghe <tom@theanalogguy.be> 5User Group: PHP-WVL & PHPGent #PHPTestFest 6--SKIPIF-- 7<?php 8$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm'); 9if (!in_array(php_sapi_name(), $enabled_sapi)) { 10 die('skip dl() is not enabled for ' . php_sapi_name()); 11} 12if (getenv('SKIP_ASAN')) die('skip dl() crashes LSan'); 13?> 14--INI-- 15enable_dl=0 16--FILE-- 17<?php 18var_dump(dl('foo')); 19?> 20--EXPECTF-- 21 22Warning: dl(): Dynamically loaded extensions aren't enabled in %s on line %d 23bool(false) 24