3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i1 = DateInterval::createFromDateString('10 minutes'); $i2 = DateInterval::createFromDateString('30 minutes'); var_dump($i1 > $i2); var_dump($i1 > $i2); $i1->__wakeup(); var_dump($i1 > $i2); var_dump($i1 > $i2);
based on H8XI5
Output for 5.3.9 - 5.6.28, 7.0.0 - 7.1.0
bool(false) bool(false) bool(true) bool(true)
Output for hhvm-3.12.0
bool(false) bool(false) Fatal error: Uncaught Error: Call to undefined method DateInterval::__wakeup() in /in/C87UC:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.3.0 - 5.3.8, hhvm-3.10.0
bool(false) bool(false) Fatal error: Call to undefined method DateInterval::__wakeup() in /in/C87UC on line 7
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/C87UC on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'dateinterval' in /in/C87UC on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'dateinterval' in /in/C87UC on line 3