3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PushAndPull { private $queue=array(); public function push($push) { array_push($this->$queue,$push); } public function pull() { return array_shift($this->$queue); } } $obj = new PushAndPull(); $obj->$queue=array(""); $obj->push(1);

preferences:
36.95 ms | 402 KiB | 5 Q