1--TEST--
2Bug #41445 (parse_ini_file() function parses octal numbers in section names)
3--FILE--
4<?php
5
6$file = dirname(__FILE__)."/bug41445.ini";
7
8$data = <<<DATA
9[001099030277]
10option1 = yes
11
12[011099030277]
13option2 = yes
14DATA;
15
16file_put_contents($file, $data);
17
18var_dump(parse_ini_file($file, TRUE));
19var_dump(parse_ini_file($file));
20
21$data = <<<DATA
22[23.44]
23option1 = yes
24
25[9633337363542736472364]
26option2 = yes
27DATA;
28
29file_put_contents($file, $data);
30
31var_dump(parse_ini_file($file, TRUE));
32var_dump(parse_ini_file($file));
33
34@unlink($file);
35
36echo "Done\n";
37?>
38--EXPECT--
39array(2) {
40  ["001099030277"]=>
41  array(1) {
42    ["option1"]=>
43    string(1) "1"
44  }
45  ["011099030277"]=>
46  array(1) {
47    ["option2"]=>
48    string(1) "1"
49  }
50}
51array(2) {
52  ["option1"]=>
53  string(1) "1"
54  ["option2"]=>
55  string(1) "1"
56}
57array(2) {
58  ["23.44"]=>
59  array(1) {
60    ["option1"]=>
61    string(1) "1"
62  }
63  ["9633337363542736472364"]=>
64  array(1) {
65    ["option2"]=>
66    string(1) "1"
67  }
68}
69array(2) {
70  ["option1"]=>
71  string(1) "1"
72  ["option2"]=>
73  string(1) "1"
74}
75Done
76