mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
70 lines
1.2 KiB
Plaintext
70 lines
1.2 KiB
Plaintext
|
--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.
|