3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "" . "[group]\n". "var=123\n". "var2]]\n". "\n". "var2]]=a\n". "var2]]=b\n". "\n". " \n". "var3]1]=test1\n". "var3]2]=test2;test3\n". "[group2]\n". ""; var_dump($s); $r = parse_ini_string( $s , true, INI_SCANNER_RAW); var_dump($r);
Output for 5.3.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(91) "[group] var=123 var2]] var2]]=a var2]]=b var3]1]=test1 var3]2]=test2;test3 [group2] " array(2) { ["group"]=> array(4) { ["var"]=> string(3) "123" ["var2]]"]=> string(1) "b" ["var3]1]"]=> string(5) "test1" ["var3]2]"]=> string(5) "test2" } ["group2"]=> array(0) { } }
Output for 5.3.0
string(91) "[group] var=123 var2]] var2]]=a var2]]=b var3]1]=test1 var3]2]=test2;test3 [group2] " Warning: syntax error, unexpected ']' in Unknown on line 3 in /in/q9Zjv on line 17 bool(false)
Output for 5.0.0 - 5.2.17
string(91) "[group] var=123 var2]] var2]]=a var2]]=b var3]1]=test1 var3]2]=test2;test3 [group2] " Fatal error: Call to undefined function parse_ini_string() in /in/q9Zjv on line 17
Process exited with code 255.
Output for 4.4.5 - 4.4.9
string(91) "[group] var=123 var2]] var2]]=a var2]]=b var3]1]=test1 var3]2]=test2;test3 [group2] " Fatal error: Call to undefined function: parse_ini_string() in /in/q9Zjv on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.4
string(91) "[group] var=123 var2]] var2]]=a var2]]=b var3]1]=test1 var3]2]=test2;test3 [group2] " Fatal error: Call to undefined function: parse_ini_string() in /in/q9Zjv on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(91) "[group] var=123 var2]] var2]]=a var2]]=b var3]1]=test1 var3]2]=test2;test3 [group2] " Fatal error: Call to undefined function: parse_ini_string() in /in/q9Zjv on line 17