3v4l.org

run code in 300+ PHP versions simultaneously
<?php // creates new DateTime for the current timezone (UTC-5 in my case) $expiresAt = new \DateTimeImmutable('+3600 seconds', new \DateTimeZone('-5')); echo 'expires: ' . $expiresAt->format(\DateTimeInterface::ISO8601) . "\n"; $generatedAt = ($expiresAt->getTimestamp() - 3600); // creates new DateTime in UTC $createdAtTime = \DateTimeImmutable::createFromFormat('U', (string) $generatedAt); echo 'created: ' . $createdAtTime->format(\DateTimeInterface::ISO8601) . "\n"; $interval = $expiresAt->diff($createdAtTime); echo 'computed interval: ' . $interval->format('%R[%yy %mM %dd %hh %im %ss]') . "\n";
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
expires: 2023-09-12T13:06:52-0500 created: 2023-09-12T17:06:52+0000 computed interval: -[0y 0M 0d 1h 0m 0s]

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:
80.39 ms | 406 KiB | 5 Q