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){ echo "$array= '$value'"; } } //$temp=array(); $temp=array(pram_alter($sql, 'pram_alter')); echo print_r($temp); ?>
based on PitMW
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/iKR6G on line 7 Array= 'lemon' Notice: Array to string conversion in /in/iKR6G on line 7 Array= 'orange' Notice: Array to string conversion in /in/iKR6G on line 7 Array= 'banana' Notice: Array to string conversion in /in/iKR6G on line 7 Array= 'apple' Notice: Array to string conversion in /in/iKR6G on line 7 Array= 'toast'Array ( [0] => ) 1
Output for 4.3.0 - 5.3.29
Array= 'lemon'Array= 'orange'Array= 'banana'Array= 'apple'Array= 'toast'Array ( [0] => ) 1