3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTimeImmutable(); $timestampMs = (int) ($date->getTimestamp() . $date->format('v')); var_dump($date); var_dump($timestampMs);
Output for git.master_jit
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2024-12-06 03:32:14.039157" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(1733452334039)
Output for git.master
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2024-12-06 03:32:14.007503" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(1733452334007)
Output for rfc.property-hooks
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2024-12-06 03:32:14.031163" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(1733452334031)

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:
93.13 ms | 408 KiB | 5 Q