3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = DateTimeImmutable::createFromFormat('U e', '1730597400 America/Toronto'); var_dump($time, $time->getTimestamp(), $time->format('U')); echo PHP_EOL; $date = new DateTimeImmutable('@1730597400', new DateTimeZone('America/Toronto')); var_Dump($date, $date->getTimestamp()); echo PHP_EOL; $date = DateTime::createFromFormat('U', '1730597400'); $date->setTimezone(new DateTimeZone('America/Toronto')); var_Dump($date, $date->getTimestamp());

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.120.0220.00716.60
8.3.110.0270.00316.59
8.3.100.0240.00316.34
8.3.90.0200.00416.33
8.3.80.0120.01216.36
8.3.70.0220.00416.50
8.3.60.0180.00616.55
8.3.50.0200.00316.31
8.3.40.0150.00617.48
8.3.30.0220.00017.57
8.3.20.0150.00617.35
8.3.10.0190.00317.50
8.3.00.0150.00717.40
8.2.240.0180.00316.91
8.2.230.0200.00216.57
8.2.220.0180.00416.53
8.2.210.0180.00416.64
8.2.200.0190.00516.84
8.2.190.0190.00516.64
8.2.180.0160.00516.48
8.2.170.0180.00317.80
8.2.160.0170.00317.87
8.2.150.0140.00617.59
8.2.140.0140.00617.55
8.2.130.0150.00417.60
8.2.120.0140.00617.81
8.2.110.0220.01117.54
8.2.100.0220.01517.70
8.2.90.0270.00617.58
8.2.80.0290.01017.77
8.2.70.0320.00617.48
8.2.60.0340.01317.57
8.2.50.0380.00317.58
8.2.40.0220.01617.63
8.2.30.0360.00317.41
8.2.20.0350.00317.56
8.2.10.0360.00717.43
8.2.00.0210.00917.66
8.1.300.0230.00316.22
8.1.290.0180.00316.05
8.1.280.0150.00416.58
8.1.270.0290.01017.64
8.1.260.0390.00017.42
8.1.250.0330.01217.48
8.1.240.0240.01017.45
8.1.230.0320.00317.46
8.1.220.0220.00917.48
8.1.210.0310.00317.46
8.1.200.0210.01617.48
8.1.190.0280.00917.17
8.1.180.0320.00916.97
8.1.170.0300.01317.50
8.1.160.0310.00717.47
8.1.150.0270.01017.30
8.1.140.0300.00717.38
8.1.130.0290.00817.18
8.1.120.0270.01017.65
8.1.110.0370.00017.35
8.1.100.0320.00617.46
8.1.90.0380.00017.41
8.1.80.0400.00017.13
8.1.70.0310.00717.23
8.1.60.0290.01217.49
8.1.50.0350.00716.99
8.1.40.0380.00317.51
8.1.30.0370.00317.18
8.1.20.0340.00817.20
8.1.10.0330.00717.30
8.1.00.0290.01117.46

preferences:
26.79 ms | 403 KiB | 5 Q