mirror of
https://github.com/php/php-src.git
synced 2024-10-20 16:02:44 +00:00
09b6f37f20
- Added ".htaccess" style user-defined php.ini files support for CGI/FastCGI. - Added support for special [PATH=/opt/httpd/www.example.com/] sections in php.ini. All directives set in these sections will not be able to be overridden in user-defined ini-files or during runtime in the specified path. - Improved php.ini handling: . Added better error reporting for syntax errors in php.ini files . Allowed "ini-variables" to be used almost everywhere ini php.ini files . Allowed using alphanumeric/variable indexes in "array" ini options . Fixed get_cfg_var() to be able to return "array" ini options - Fixed bug #27372 (parse error loading browscap.ini at apache startup) - Fixed bug #42069 (parse_ini_file() allows using some non-alpha numeric characters)
70 lines
1.2 KiB
PHP
70 lines
1.2 KiB
PHP
--TEST--
|
|
parse_ini_file() boolean operators
|
|
--FILE--
|
|
<?php
|
|
|
|
$ini_file = dirname(__FILE__)."/parse_ini_booleans.data";
|
|
|
|
var_dump(parse_ini_file($ini_file, 1));
|
|
|
|
echo "Done.\n";
|
|
|
|
?>
|
|
--EXPECTF--
|
|
array(3) {
|
|
["error_reporting values"]=>
|
|
array(6) {
|
|
["foo"]=>
|
|
string(14) "E_ALL E_NOTICE"
|
|
["error_reporting"]=>
|
|
string(4) "6143"
|
|
["error_reporting1"]=>
|
|
string(4) "4177"
|
|
["error_reporting2"]=>
|
|
string(4) "6135"
|
|
["error_reporting3"]=>
|
|
string(4) "6135"
|
|
["error_reporting4"]=>
|
|
string(4) "8183"
|
|
}
|
|
["true or false"]=>
|
|
array(8) {
|
|
["bool_true"]=>
|
|
string(1) "1"
|
|
["bool_yes"]=>
|
|
string(1) "1"
|
|
["bool_on"]=>
|
|
string(1) "1"
|
|
["bool_false"]=>
|
|
string(0) ""
|
|
["bool_off"]=>
|
|
string(0) ""
|
|
["bool_no"]=>
|
|
string(0) ""
|
|
["bool_none"]=>
|
|
string(0) ""
|
|
["bool_null"]=>
|
|
string(0) ""
|
|
}
|
|
["strings"]=>
|
|
array(8) {
|
|
["string_true"]=>
|
|
string(4) "true"
|
|
["string_yes"]=>
|
|
string(4) " yes"
|
|
["string_on"]=>
|
|
string(5) " on "
|
|
["string_false"]=>
|
|
string(5) "false"
|
|
["string_off"]=>
|
|
string(4) "Off "
|
|
["string_no"]=>
|
|
string(4) "No "
|
|
["string_none"]=>
|
|
string(5) " NoNe"
|
|
["string_null"]=>
|
|
string(4) "NULl"
|
|
}
|
|
}
|
|
Done.
|