3v4l.org

run code in 300+ PHP versions simultaneously
<?php $intervals = array( '1 second' => 1, '1 minute' => 60 * 60, '1 day' => 60 * 60 * 24, '1 year' => 60 * 60 * 24 * 365 ); foreach ($intervals as $interval => $expected) { $zeroDate = new \DateTime('@0'); $zeroDate->add(\DateInterval::createFromDateString($interval)); echo (sprintf('found %s expected %s', $zeroDate->getTimestamp(), $expected)); }
Output for git.master, git.master_jit, rfc.property-hooks
found 1 expected 1found 60 expected 3600found 86400 expected 86400found 31536000 expected 31536000

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