3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $m = memory_get_usage(true); var_dump(change('shmest', change('test', create()))); echo ($m2 = memory_get_usage(true)) - $m; $m = memory_get_usage(true); var_dump(change('shmest', &change('test', &create()))); echo ($m2 = memory_get_usage(true)) - $m; function create() { return ['type' => 'smth', 'property' => 'smth too']; } function &change($prop, &$obj) { $obj['property'] = $prop; return $obj; }
Output for 5.3.0 - 5.4.29
Fatal error: Can't use function return value in write context in /in/DAI5U on line 8
Process exited with code 255.