com php-src: Tests the 'Dynamically loaded extensions are not enabled' warning for dl(): ext/standard/tests/general_functions/dl-che ck-enabled.phpt

From: Date: Sun, 10 Feb 2019 19:13:12 +0000
Subject: com php-src: Tests the 'Dynamically loaded extensions are not enabled' warning for dl(): ext/standard/tests/general_functions/dl-che ck-enabled.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104516@lists.php.net to get a copy of this message
Commit: 3f93f1591e0b94cb5217673058341c957db92c93 Author: Tom Van Herreweghe <tom.van.herreweghe@dx-solutions.be> Mon, 27 Nov 2017 22:02:19 +0100 Committer: Peter Kokot <peterkokot@gmail.com> Sun, 10 Feb 2019 20:13:12 +0100 Parents: 27b366c9e4030777f5989407fc708b86f0822e03 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3f93f1591e0b94cb5217673058341c957db92c93 Log: Tests the 'Dynamically loaded extensions are not enabled' warning for dl() Signed-off-by: Tom Van Herreweghe <tom.van.herreweghe@dx-solutions..be> Changed paths: A ext/standard/tests/general_functions/dl-check-enabled.phpt Diff: diff --git a/ext/standard/tests/general_functions/dl-check-enabled.phpt b/ext/standard/tests/general_functions/dl-check-enabled.phpt new file mode 100644 index 0000000..7559b8d --- /dev/null +++ b/ext/standard/tests/general_functions/dl-check-enabled.phpt @@ -0,0 +1,22 @@ +--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)

« previous php.cvs (#104516) next »