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) { foreach ($array as $value){ echo "$$key = '$array'"; } } //$temp=array(); $temp=array(pram_alter($sql, 'pram_alter')); echo print_r($temp); ?>
based on Zoeja
Output for 5.4.0 - 7.1.0, 7.1.6 - 7.2.0
Notice: Array to string conversion in /in/37ZB6 on line 7 $pram_alter = 'Array' Notice: Array to string conversion in /in/37ZB6 on line 7 $pram_alter = 'Array' Notice: Array to string conversion in /in/37ZB6 on line 7 $pram_alter = 'Array' Notice: Array to string conversion in /in/37ZB6 on line 7 $pram_alter = 'Array' Notice: Array to string conversion in /in/37ZB6 on line 7 $pram_alter = 'Array'Array ( [0] => ) 1
Output for 7.1.5

Process exited with code 137.
Output for 4.3.0 - 5.3.29
$pram_alter = 'Array'$pram_alter = 'Array'$pram_alter = 'Array'$pram_alter = 'Array'$pram_alter = 'Array'Array ( [0] => ) 1