<?php
class Month extends SplEnum {
const __default = self::January;
const January = 1;
const February = 2;
const March = 3;
const April = 4;
const May = 5;
const June = 6;
const July = 7;
const August = 8;
const September = 9;
const October = 10;
const November = 11;
const December = 12;
}
$x = new Month(12);
$y = new Month(1);
$z = $x < $y;
var_dump($z);
Fatal error: Uncaught Error: Class "SplEnum" not found in /in/KsOSh:2
Stack trace:
#0 {main}
thrown in /in/KsOSh on line 2
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'SplEnum' not found in /in/KsOSh:2
Stack trace:
#0 {main}
thrown in /in/KsOSh on line 2
Process exited with code 255.
Fatal error: Class 'SplEnum' not found in /in/KsOSh on line 2
Process exited with code 255.
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/KsOSh on line 3
Process exited with code 255.
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/KsOSh on line 3
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/KsOSh on line 3
Process exited with code 255.