3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $m1 = memory_get_usage(true); var_dump(change('shmest', change('test', create()))); $m2 = memory_get_usage(true); echo $m2 - $m1; $m1 = memory_get_usage(true); var_dump(&change('shmest', &change('test', &create()))); $m2 = memory_get_usage(true); echo $m2 - $m1; 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/8oeL2 on line 9
Process exited with code 255.