3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $iso = 'R2/2013-09-09T12:00:15Z/P1D'; $periods = new DatePeriod($iso); var_dump( is_object($periods) ); $iso = 'R2/2013-09-09T12:00:15+02:00/P1D'; $periods = new DatePeriod($iso); var_dump( is_object($periods) );
Output for 7.0.0 - 7.1.0
bool(true) Fatal error: Uncaught Exception: DatePeriod::__construct(): Unknown or bad format (R2/2013-09-09T12:00:15+02:00/P1D) in /in/BPNBg:7 Stack trace: #0 /in/BPNBg(7): DatePeriod->__construct('R2/2013-09-09T1...') #1 {main} thrown in /in/BPNBg on line 7
Process exited with code 255.
Output for hhvm-3.12.0
Catchable fatal error: Argument 1 passed to DatePeriod::__construct() must implement interface DateTimeInterface, string given in /in/BPNBg on line 3
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.28 - 5.3.29, 5.4.20 - 5.6.28
bool(true) Fatal error: Uncaught exception 'Exception' with message 'DatePeriod::__construct(): Unknown or bad format (R2/2013-09-09T12:00:15+02:00/P1D)' in /in/BPNBg:7 Stack trace: #0 /in/BPNBg(7): DatePeriod->__construct('R2/2013-09-09T1...') #1 {main} thrown in /in/BPNBg on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
bool(true) Fatal error: Uncaught exception 'Exception' with message 'DatePeriod::__construct(): Unknown or bad format (R2/2013-09-09T12:00:15+02:00/P1D)' in /in/b4n9j:7 Stack trace: #0 /in/b4n9j(7): DatePeriod->__construct('R2/2013-09-09T1...') #1 {main} thrown in /in/b4n9j on line 7
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Fatal error: Class 'DatePeriod' not found in /in/b4n9j on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/b4n9j on line 3
Process exited with code 255.
Output for 4.3.1
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/b4n9j on line 3
Output for 4.3.0
Fatal error: Cannot instantiate non-existent class: dateperiod in /in/BPNBg on line 3