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) { foreach ($array as $value){ foreach($value as $data){ echo "$array= '$data'"; } } } //$temp=array(); $temp=array(pram_alter($sql, 'pram_alter')); echo print_r($temp); ?>
based on eXHos
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 7 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 7 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 7 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 7 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 7 Array ( [0] => ) 1
Output for hhvm-3.10.0 - 3.12.0
Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 9 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 9 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 9 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 9 Warning: Invalid argument supplied for foreach() in /in/CMFEF on line 9 Array ( [0] => ) 1
Output for 4.3.11
Array ( [0] => ) 1