3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.4.11
Fatal error: Cannot use [] for reading in /in/kZCdG on line 22
Process exited with code 255.