3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sql = array("inUserID" => "lemon", "inCustID" => "orange", "btAll" => "banana", "btPermPref" => "apple", "inDisplay"=>"toast"); function pram_alter($array, $key) { //echo implode(',', each($array)); reset($sql); while (list($key, $val) = each($sql)) { echo "$key => $val\n"; } } $temp=array(pram_alter($sql, 'pram_alter')); ?>
based on ne2IL
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: reset() expects parameter 1 to be array, null given in /in/n4nHl on line 8 Warning: Variable passed to each() is not an array or object in /in/n4nHl on line 9
Output for hhvm-3.10.0 - 3.12.0
Warning: Invalid operand type was used: expecting an array in /in/n4nHl on line 8 Warning: Invalid operand type was used: expecting an array in /in/n4nHl on line 9
Output for 4.3.2 - 5.2.17
Warning: reset(): Passed variable is not an array or object in /in/n4nHl on line 8 Warning: Variable passed to each() is not an array or object in /in/n4nHl on line 9
Output for 4.3.0 - 4.3.1
Warning: reset() [http://www.php.net/function.reset]: Passed variable is not an array or object in /in/n4nHl on line 8 Warning: Variable passed to each() is not an array or object in /in/n4nHl on line 9