3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
56.9 ms | 402 KiB | 5 Q