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)); while (list($key, $val) = each($sql)) { echo "$key => $val\n"; } } $temp=array(pram_alter($sql, 'pram_alter')); ?>
based on n4nHl
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Variable passed to each() is not an array or object in /in/ockPr on line 9
Output for hhvm-3.12.0
Warning: Invalid operand type was used: expecting an array in /in/ockPr on line 9
Output for hhvm-3.10.0

Process exited with code 153.