3v4l.org

run code in 300+ PHP versions simultaneously
<?php const SOMETHING = 'yep'; function this_wont_work() { echo "for real thisll blow up"; } $foo = new class { public $one = 'basic string'; public $two = 124; public $three = SOMETHING; }
Output for 7.0.0
Parse error: syntax error, unexpected end of file in /in/kJVu6 on line 14
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/kJVu6 on line 7
Process exited with code 255.

preferences:
176 ms | 1395 KiB | 24 Q