3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt1 = DateTime::createFromString('Y-m-d', '2016-01-26'); $dt2 = DateTime::createFromString('Y-m-d', '2016-02-29'); $dti = $dt2->diff($dt1); echo $dti->format('%R%a days');
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined method DateTime::createFromString() in /in/sbQ8O:3 Stack trace: #0 {main} thrown in /in/sbQ8O on line 3
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Fatal error: Call to undefined method DateTime::createFromString() in /in/sbQ8O on line 3
Process exited with code 255.