3v4l.org

run code in 200+ 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 7.2.0
Warning: reset() expects parameter 1 to be array, null given in /in/n4nHl on line 8 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /in/n4nHl on line 9 Warning: Variable passed to each() is not an array or object in /in/n4nHl on line 9
Output for 5.3.0 - 7.1.7
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 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