3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sStartDate = DateTime::createFromFormat('2013-13-05 21:56:00'); $sEndDate = DateTime::createFromFormat('2013-15-05 21:56:01'); $diff = date_diff($sStartDate, $sEndDate, true); $days = $diff->format('%a'); echo $days; if (1 <= $days) { echo '24 hours or more.'; } else { echo 'less than 24 hours.'; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: DateTime::createFromFormat() expects at least 2 arguments, 1 given in /in/BLgHY:3 Stack trace: #0 /in/BLgHY(3): DateTime::createFromFormat('2013-13-05 21:5...') #1 {main} thrown in /in/BLgHY on line 3
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.36 ms | 401 KiB | 8 Q