3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { protected $field = 123; public getField() { return $this->field; } } $test = new Test; $value = $test->getField();
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'getField' (T_STRING), expecting variable (T_VARIABLE) in /in/sUImM on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/sUImM on line 6
Process exited with code 255.