php-src/ext/standard/tests/general_functions/dl-check-enabled.phpt
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

22 lines
506 B
PHP

--TEST--
dl() returns false when disabled via INI settings
+--CREDITS--
Tom Van Herreweghe <tom@theanalogguy.be>
User Group: PHP-WVL & PHPGent #PHPTestFest
--SKIPIF--
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
die('skip dl() is not enabled for ' . php_sapi_name());
}
?>
--INI--
enable_dl=0
--FILE--
<?php
var_dump(dl('foo'));
?>
--EXPECTF--
Warning: dl(): Dynamically loaded extensions aren't enabled in %s on line %d
bool(false)