3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { private $test = null; public $anything = true; private function getTest() { return $this->test; } } function doStuff() { echo $this->test; echo $this->getTest(); echo $this->anything; } $a = new A(); $fn = doStuff->bindTo($a, $a); $fn();
Output for 5.4.0 - 5.5.2
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/A4hfH on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/A4hfH on line 27
Process exited with code 255.