3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const MY_CONSTANT = 'FUCKER'; public function __construct() { self::MY_CONSTANT = 'why'; var_dump(self::MY_CONSTANT); } } $t = new Test();
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '=' in /in/AM5k9 on line 6
Process exited with code 255.

preferences:
182.79 ms | 1386 KiB | 58 Q