3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Some { privaste $s; public function __construct($s) { $this->s = $s; } public function print() { echo $this->s . PHP _EOL; } } $s = new Some('done'); call_user_func(['Some', 'print'], $s);
Output for 7.1.0 - 7.3.0beta2
Parse error: syntax error, unexpected 'privaste' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /in/Qvv4g on line 5
Process exited with code 255.
Output for 5.6.30, 7.0.0 - 7.0.31
Parse error: syntax error, unexpected 'privaste' (T_STRING), expecting function (T_FUNCTION) in /in/Qvv4g on line 5
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /in/Qvv4g:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /in/Qvv4g:5 Stack trace: #0 {main}
Process exited with code 255.