3v4l.org

run code in 300+ PHP versions simultaneously
<?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.1.21, 7.2.0 - 7.2.9
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 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.

preferences:
191.67 ms | 1395 KiB | 71 Q