3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $interval = new DateInterval('P2D'); var_dump(property_exists($interval, 'd'));
Output for 7.0.14 - 7.2.8
bool(true)
Output for 5.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.0.13
bool(false)
Output for 5.0.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/NifA6 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: dateinterval in /in/NifA6 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: dateinterval in /in/NifA6 on line 2