3v4l.org

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