1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Files
archived-php-src/ext/standard/tests/general_functions/bug41445_1.phpt
T
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

55 lines
852 B
PHP

--TEST--
Bug #41445 (parse_ini_file() function parses octal numbers in section names) - 2
--FILE--
<?php
$file = dirname(__FILE__)."/bug41445_1.ini";
$data = <<<DATA
[2454.33]
09 = yes
[9876543]
098765434567876543 = yes
[09876543]
987654345678765432456798765434567876543 = yes
DATA;
file_put_contents($file, $data);
var_dump(parse_ini_file($file, TRUE));
var_dump(parse_ini_file($file));
@unlink($file);
echo "Done\n";
?>
--EXPECT--
array(3) {
["2454.33"]=>
array(1) {
["09"]=>
string(1) "1"
}
[9876543]=>
array(1) {
["098765434567876543"]=>
string(1) "1"
}
["09876543"]=>
array(1) {
["987654345678765432456798765434567876543"]=>
string(1) "1"
}
}
array(3) {
["09"]=>
string(1) "1"
["098765434567876543"]=>
string(1) "1"
["987654345678765432456798765434567876543"]=>
string(1) "1"
}
Done