3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $assoc = array(15,0,19,1,42,3); function test_context($in_array){ sort($in_array); print_r($assoc); return(0); } test_context($assoc); print_r($assoc); ?>
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: assoc in /in/UPDhh on line 7 Array ( [0] => 15 [1] => 0 [2] => 19 [3] => 1 [4] => 42 [5] => 3 )
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: assoc in /in/UPDhh on line 7 Array ( [0] => 15 [1] => 0 [2] => 19 [3] => 1 [4] => 42 [5] => 3 )