3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '?foo&bar[]=0&bar[]=2'; $res1=$res2=[]; parse_str($string,$res1); mb_parse_str($string,$res2); echo 'parse_str()'.PHP_EOL; print_r($res1); echo 'mb_parse_str()'.PHP_EOL; print_r($res2);
Output for 5.4.0 - 7.2.0
parse_str() Array ( [?foo] => [bar] => Array ( [0] => 0 [1] => 2 ) ) mb_parse_str() Array ( [?foo] => [bar] => Array ( [0] => 0 [1] => 2 ) )
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/r2KO1 on line 5
Process exited with code 255.