3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timestamps = array( strtotime("now"), strtotime("-3 seconds"), strtotime("-30 minutes"), strtotime("-60 minute"), strtotime("-90 minutes"), strtotime("-1550 minutes"), strtotime("-889385 seconds"), ); $dateTimeFile = new DateTime(); foreach ($timestamps as $timestamp) { $dateTimeFile->setTimestamp($timestamp); $interval = (new DateTime)->diff($dateTimeFile); echo sprintf( "%s%s%s%s", $interval->d > 0 ? $interval->d . "d " : "", $interval->h > 0 ? $interval->h . "h " : "", $interval->i > 0 ? $interval->i . "m " : "", $interval->s > 0 ? $interval->s . "s " : "" ); echo PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
3s 30m 1h 1h 30m 1d 1h 50m 10d 7h 3m 5s

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