3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Month extends SplEnum { const __default = self::Enero; const Enero = 1; const Febrero = 2; const Marzo = 3; const Abril = 4; const Mayo = 5; const Junio = 6; const Julio = 7; const Agosto = 8; const Septiembre = 9; const Octubre = 10; const Noviembre = 11; const Diciembre = 12; } echo new Month(Month::Junio) . PHP_EOL;
Output for 7.3.0
Fatal error: Uncaught Error: Class 'SplEnum' not found in /in/aTk1q:3 Stack trace: #0 {main} thrown in /in/aTk1q on line 3
Process exited with code 255.
Output for 5.3.19 - 5.6.38, 7.0.0 - 7.2.13
Fatal error: Class 'SplEnum' not found in /in/aTk1q on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: unknown class SplEnum in /in/aTk1q:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: unknown class SplEnum in /in/aTk1q:3 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: unknown class SplEnum in /in/aTk1q on line 3
Process exited with code 255.