3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $labels='blaat'; function loadDatabaseLabels($labels){ $labels->labels = array("foo","bar","baz"); return $labels; } function getLabel($labels){ var_dump($labels->labels); } $labels = loadDatabaseLabels($labels); getLabel($labels);
Output for 5.0.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Attempt to assign property of non-object in /in/m3cue on line 5 Notice: Trying to get property of non-object in /in/m3cue on line 10 NULL
Output for hhvm-3.12.0
Warning: Cannot access property on non-object in /in/m3cue on line 5 Notice: Cannot access property on non-object in /in/m3cue on line 10 NULL
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.4.9
NULL