3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $params = array(); foreach (explode($array, '&') as $param) { list($key, $value) = explode($param, '=', 2); $params[$key] = $value; } print_r($params); ?>
Output for 5.2.5 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: array in /in/Gsmpf on line 4 Warning: explode(): Empty delimiter in /in/Gsmpf on line 4 Warning: Invalid argument supplied for foreach() in /in/Gsmpf on line 4 Array ( )
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: array in /in/Gsmpf on line 4 Warning: Invalid argument: delimiter: (empty) in /in/Gsmpf on line 4 Warning: Invalid argument supplied for foreach() in /in/Gsmpf on line 8 Array ( )
Output for 5.0.4 - 5.2.4
Notice: Undefined variable: array in /in/Gsmpf on line 4 Warning: explode(): Empty delimiter. in /in/Gsmpf on line 4 Warning: Invalid argument supplied for foreach() in /in/Gsmpf on line 4 Array ( )
Output for 4.3.2 - 4.3.10, 4.4.0 - 5.0.3
Notice: Undefined variable: array in /in/Gsmpf on line 4 Warning: explode(): Empty delimiter. in /in/Gsmpf on line 4 Warning: Invalid argument supplied for foreach() in /in/Gsmpf on line 4 Array ( )
Output for 4.3.11
Notice: Undefined variable: array in /in/Gsmpf on line 4 Warning: explode(): Empty delimiter. in /in/Gsmpf on line 4 Array ( )
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: array in /in/Gsmpf on line 4 Warning: explode() [http://www.php.net/function.explode]: Empty delimiter. in /in/Gsmpf on line 4 Warning: Invalid argument supplied for foreach() in /in/Gsmpf on line 4 Array ( )