3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $emode = 'Exception'; public function error($text) { thrw new $this->emode($text); } } $a = new a; $a->error('test');
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17, 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/84WS5 on line 6
Process exited with code 255.

preferences:
185.77 ms | 1400 KiB | 28 Q