3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { const MY_CONSTANT = 'FUCKER'; public function __construct() { self::MY_CONSTANT = 'why'; define('MY_CONSTANT', '123'); var_dump(self::MY_CONSTANT); } } $t = new Test();
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected '=' in /in/7KCCE on line 6
Process exited with code 255.