3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class FooBar { const INTERVAL_ONE_MINUTE = 'minute'; const INTERVAL_TWO_MINUTES = 120000; const INTERVAL_FIVE_MINUTES = 300000; const INTERVAL_TEN_MINUTES = 600000; const INTERVAL_QUARTER_HOUR = 'fifteen'; const INTERVAL_HALF_HOUR = 'thirty'; const INTERVAL_ONE_HOUR = 'hour'; const INTERVAL_TWO_HOURS = 7.2e+6; const INTERVAL_FOUR_HOURS = 1.44e+7; const INTERVAL_HALF_DAY = 4.32e+7; const INTERVAL_ONE_DAY = 'day'; const INTERVAL_TWO_DAYS = 1.728e+8; const INTERVAL_ONE_WEEK = 6.048e+8; } echo FooBar::INTERVAL_ONE_MINUTE;
Output for 5.0.0 - 7.1.0
minute
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/3Q1XF on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/3Q1XF on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/3Q1XF on line 5
Process exited with code 255.