3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $running_time = $_SERVER['REQUEST_TIME']; // calculated before, type DateInterval. Echoing the formatted value shows correct time $total = DateTime::createFromFormat('%I:%S', "10:00"); // ten minutes, 0 seconds expected total running time echo "\n"; $running_time = DateTime::createFromFormat('U', $running_time); echo "\n"; echo $running_time = $running_time->format('%I:%S'); echo "\n"; echo $time_left = $total->diff(new DateTime($running_time)); // fatal error
Output for git.master, git.master_jit
1419917011 %0:%th Fatal error: Uncaught Error: Call to a member function diff() on bool in /in/BKJGH:10 Stack trace: #0 {main} thrown in /in/BKJGH on line 10
Process exited with code 255.
Output for rfc.property-hooks
1419917011 %0:%th Fatal error: Uncaught Error: Call to a member function diff() on false in /in/BKJGH:10 Stack trace: #0 {main} thrown in /in/BKJGH on line 10
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:
51.9 ms | 401 KiB | 8 Q