3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Tehran'); $date1 = new \DateTime('2019-08-21 12:47:24'); $date2 = new \DateTime('2019-09-24 11:47:24'); //$date2 = new \DateTime('2019-08-21 12:47:24'); $diff = $date1->diff($date2); $date3 = new \DateTime('@' . $date1->format('U')); $date4 = new \DateTime('@' . ($date2->format('U')-3600)); //Sun 22 set, 0.00 a.m, when local clocks were set backward 1 hour $diff2 = $date3->diff($date4); if ($diff->h < 0) { echo $diff->format('%R%a Total number of days as a result of a DateTime::diff() or (unknown) otherwise %d days not already covered by the month Time = %H:%I:%S') . PHP_EOL; echo $diff2->format('%R%a Total number of days as a result of a DateTime::diff() or (unknown) otherwise %d days not already covered by the month Time = %H:%I:%S') . PHP_EOL; }
Output for git.master, git.master_jit
/bin/php-git-master: error while loading shared libraries: libonig.so.5: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for rfc.property-hooks

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:
44.31 ms | 401 KiB | 8 Q