3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array('first','second','third','fourth'); /* foreach($a as &$v ){} foreach($a as $v){} */ // print_r($a); $temp = array(); $items = array( array('id'=>1,'pid'=>0,'name'=>'cate','level'=>1)); foreach($items as $value){ $temp[]= &$value; } $n = array(); foreach($a as $v){ $n[] = &$v; } // print_r($n);
based on QZQaV
Output for 5.6.0 - 7.3.0beta1