3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [1,2,3]; foreach ( $array as $k=>&$v ) { $v = get_something_else(); // return 3 4 5 } var_dump($array);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function get_something_else() in /in/kFn40:6 Stack trace: #0 {main} thrown in /in/kFn40 on line 6
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined function get_something_else() in /in/kFn40 on line 6
Process exited with code 255.