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[]; $obj->push(1);
Output for 5.3.0 - 5.3.21, 5.4.0 - 5.4.11
Fatal error: Cannot use [] for reading in kZCdG on line 22
Process exited with code 255.

preferences:
173.65 ms | 1395 KiB | 41 Q