3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class T { public static $STATUS_ACTIVE = 1; public static $STATUS_INACTIVE = 2; public $statuses = array( self::$STATUS_ACTIVE => 'Active', self::$STATUS_INACTIVE => 'Inactive', ); } var_dump(new T());
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$STATUS_ACTIVE' (T_VARIABLE), expecting identifier (T_STRING) in /in/6T6ma on line 7
Process exited with code 255.
Output for 5.3.7 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING in /in/6T6ma on line 7
Process exited with code 255.