3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timezone = new \DateTimeZone(\date_default_timezone_get()); $now = new \DateTimeImmutable('now', $timezone); $date = \DateTimeImmutable::createFromFormat('Y-m-d H:i:s.u', '2023-09-28 12:40:21.018835', $timezone); var_dump($now, $date, $now === $date, $now > $date, $now < $date);
Output for git.master_jit
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2023-09-28 12:41:44.005428" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTimeImmutable)#3 (3) { ["date"]=> string(26) "2023-09-28 12:40:21.018835" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) bool(true) bool(false)
Output for git.master
/bin/php-git-master: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-git-master) /bin/php-git-master: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-git-master)
Process exited with code 1.
Output for rfc.property-hooks
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2023-09-28 12:41:44.003698" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTimeImmutable)#3 (3) { ["date"]=> string(26) "2023-09-28 12:40:21.018835" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(false) bool(true) bool(false)

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:
30.69 ms | 409 KiB | 5 Q