3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = [ '123.animal=cat', '123.name=fred', '123.food=fish', '345.animal=dog', 'petshop=zoonoria', ]; $ini = parse_ini_string($data); $result = []; foreach ($ini as $key => $value) { echo $key, ' => ', $value, PHP_EOL; }
Output for 5.4.10 - 7.2.0
Warning: parse_ini_string() expects parameter 1 to be string, array given in /in/fSLbU on line 11 Warning: Invalid argument supplied for foreach() in /in/fSLbU on line 13
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/fSLbU on line 3
Process exited with code 255.