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 = ["5.0", "5.1"] '); fclose($fh); // Parse with sections $ini_array = parse_ini_file($file, true); print_r($ini_array);
based on dRX2l
Output for 7.1.0
Notice: tempnam(): file created in the system's temporary directory in /in/DOnTf 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] => [5.0,5.1] ) )
Output for 5.3.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] => [5.0,5.1] ) )
Output for 5.0.0 - 5.2.17
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] => ) ["5.0", "5.1"] => Array ( ) )
Output for 4.4.9
Warning: Error parsing /tmp/testkblaoM on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.8
Warning: Error parsing /tmp/testpey7jO on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.7
Warning: Error parsing /tmp/testfY0gIN on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.6
Warning: Error parsing /tmp/testQm6CZP on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.5
Warning: Error parsing /tmp/testrAFF5T on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.4
Warning: Error parsing /tmp/test9zFeLW on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.3
Warning: Error parsing /tmp/testCq4IBY on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.2
Warning: Error parsing /tmp/testXATQE1 on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.1
Warning: Error parsing /tmp/testmJSoG4 on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.4.0
Warning: Error parsing /tmp/testNWWzY6 on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.11
Warning: Error parsing /tmp/test4yVSR8 on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.10
Warning: Error parsing /tmp/testR7gbxb on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.9
Warning: Error parsing /tmp/test8SLCab on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.8
Warning: Error parsing /tmp/test3ijOLd on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.7
Warning: Error parsing /tmp/testZGNX3g on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.6
Warning: Error parsing /tmp/testCmkRrj on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.5
Warning: Error parsing /tmp/testkzLxYi on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.4
Warning: Error parsing /tmp/testqaTWGk on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.3
Warning: Error parsing /tmp/test1oKAQo on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.2
Warning: Error parsing /tmp/testeSwPMq on line 11 in /in/DOnTf on line 21 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] => [ ) )
Output for 4.3.1
Warning: Error parsing /tmp/testi6SSAq on line 11 in Unknown on line 0 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] => [ ) )
Output for 4.3.0
Warning: Error parsing /tmp/test587U7N on line 11 in Unknown on line 0 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] => [ ) )