3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $file = tempnam('.', 'test'); $fh = fopen($file, 'w+'); fwrite($fh, '[first_section] one = 1 five = 5 animal = BIRD [second_section] path = "/usr/local/bin" URL = "http://www.example.com/~username" [third_section] phpversion[0] = "5.0" phpversion[1] = "5.1" phpversion[2] = "5.2" phpversion[3] = "5.3" '); fclose($fh); // Parse with sections $ini_array = parse_ini_file($file, true); print_r($ini_array);
based on DMEud
Output for 7.1.0
Notice: tempnam(): file created in the system's temporary directory in /in/dRX2l on line 3 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( [phpversion] => Array ( [0] => 5.0 [1] => 5.1 [2] => 5.2 [3] => 5.3 ) ) )
Output for 5.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.0.14
Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( [phpversion] => Array ( [0] => 5.0 [1] => 5.1 [2] => 5.2 [3] => 5.3 ) ) )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.17
Warning: Error parsing /tmp/testHib7eZ on line 12 in /in/dRX2l on line 24
Output for 5.2.16
Warning: Error parsing /tmp/test4ERpr0 on line 12 in /in/dRX2l on line 24
Output for 5.2.15
Warning: Error parsing /tmp/testlMZ0P3 on line 12 in /in/dRX2l on line 24
Output for 5.2.14
Warning: Error parsing /tmp/test5xz8i9 on line 12 in /in/dRX2l on line 24
Output for 5.2.13
Warning: Error parsing /tmp/testrUxRIb on line 12 in /in/dRX2l on line 24
Output for 5.2.12
Warning: Error parsing /tmp/testVgBB3c on line 12 in /in/dRX2l on line 24
Output for 5.2.11
Warning: Error parsing /tmp/test0hjNMg on line 12 in /in/dRX2l on line 24
Output for 5.2.10
Warning: Error parsing /tmp/testRHnd4i on line 12 in /in/dRX2l on line 24
Output for 5.2.9
Warning: Error parsing /tmp/testT2vKto on line 12 in /in/dRX2l on line 24
Output for 5.2.8
Warning: Error parsing /tmp/testKyry0r on line 12 in /in/dRX2l on line 24
Output for 5.2.7
Warning: Error parsing /tmp/testFlC4nu on line 12 in /in/dRX2l on line 24
Output for 5.2.6
Warning: Error parsing /tmp/testJOlS1n on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.2.5
Warning: Error parsing /tmp/testh9aNGr on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.2.4
Warning: Error parsing /tmp/test5rURZt on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.2.3
Warning: Error parsing /tmp/testFmxv3u on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.2.2
Warning: Error parsing /tmp/testIEKWby on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.2.1
Warning: Error parsing /tmp/testV8SCsA on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.2.0
Warning: Error parsing /tmp/testaUPbrG on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.6
Warning: Error parsing /tmp/testoJXuvJ on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.5
Warning: Error parsing /tmp/testOHqU8J on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.4
Warning: Error parsing /tmp/testyXxDJM on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.3
Warning: Error parsing /tmp/testIHCgyP on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.2
Warning: Error parsing /tmp/test3rky3R on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.1
Warning: Error parsing /tmp/testEEbSvY on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.1.0
Warning: Error parsing /tmp/testdjWWw1 on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.0.5
Warning: Error parsing /tmp/testkKm0g2 on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.0.4
Warning: Error parsing /tmp/testWAu114 on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.0.3
Warning: Error parsing /tmp/testiNC627 on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.0.2
Warning: Error parsing /tmp/test8ECeca on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.0.1
Warning: Error parsing /tmp/testdpfHQc on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 5.0.0
Warning: Error parsing /tmp/testK00N5e on line 12 in /in/dRX2l on line 24 Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( ) [0] => Array ( ) )
Output for 4.3.0 - 4.4.9
Array ( [first_section] => Array ( [one] => 1 [five] => 5 [animal] => BIRD ) [second_section] => Array ( [path] => /usr/local/bin [URL] => http://www.example.com/~username ) [third_section] => Array ( [phpversion[0]] => 5.0 [phpversion[1]] => 5.1 [phpversion[2]] => 5.2 [phpversion[3]] => 5.3 ) )