3v4l.org

run code in 300+ PHP versions simultaneously
<?php function timeZoneToOffset(string $timeZone): \DateTimeImmutable { return new DateTimeImmutable( '2020-01-01 15:00' . (new \DateTime('now', new DateTimeZone($timeZone)))->format('P') ); } var_dump(timeZoneToOffset('Europe/Paris')->getTimestamp() === timeZoneToOffset('Africa/Cairo')->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.40.0140.00020.34
8.3.30.0120.00318.76
8.3.20.0000.00824.18
8.3.10.0060.00324.66
8.3.00.0050.00326.16
8.2.170.0040.01118.96
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0060.00322.21
8.2.100.0000.01217.91
8.2.90.0050.00318.03
8.2.80.0040.00418.17
8.2.70.0000.00817.75
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0050.00318.11
8.2.30.0040.00418.05
8.2.20.0050.00319.20
8.2.10.0000.00718.01
8.2.00.0000.00719.32
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0090.00022.14
8.1.230.0050.00521.10
8.1.220.0050.00317.79
8.1.210.0030.00618.89
8.1.200.0040.00417.47
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0060.00618.49
8.1.160.0050.00218.71
8.1.150.0040.00418.76
8.1.140.0050.00217.60
8.1.130.0040.00419.07
8.1.120.0000.01017.56
8.1.110.0070.00017.49
8.1.100.0160.00017.36
8.1.90.0100.00717.52
8.1.80.0160.00217.41
8.1.70.0170.00017.46
8.1.60.0150.00517.59
8.1.50.0190.00017.56
8.1.40.0130.00417.55
8.1.30.0090.00917.66
8.1.20.0140.00617.65
8.1.10.0070.01417.59
8.1.00.0260.00017.50
8.0.300.0040.00420.03
8.0.290.0040.00416.99
8.0.280.0040.00420.36
8.0.270.0030.00318.33
8.0.260.0000.00718.65
8.0.250.0030.00317.21
8.0.240.0050.00317.14
8.0.230.0040.01217.24
8.0.220.0110.00717.15
8.0.210.0160.00017.15
8.0.200.0090.00717.15
8.0.190.0090.00617.17
8.0.180.0120.00417.07
8.0.170.0040.01117.10
8.0.160.0080.00817.20
8.0.150.0130.00317.01
8.0.140.0050.01016.96
8.0.130.0090.00617.15
8.0.120.0090.00617.23
8.0.110.0090.00517.09
8.0.100.0120.00317.12
8.0.90.0150.00017.07
8.0.80.0120.00317.06
8.0.70.0080.00816.89
8.0.60.0150.00016.98
8.0.50.0050.01016.98
8.0.30.0070.00716.91
8.0.20.0090.00617.16
8.0.10.0130.00217.23
7.4.330.0000.00515.55
7.4.320.0000.00616.63
7.4.300.0130.00316.74
7.4.290.0040.01216.74
7.4.280.0110.00516.74
7.4.270.0170.00016.64
7.4.260.0160.00016.63
7.4.250.0140.00316.57
7.4.240.0090.00716.63
7.4.230.0130.00416.71
7.4.220.0150.00016.59
7.4.210.0050.01016.75
7.4.200.0120.00316.65
7.4.190.0150.00016.78
7.4.180.0090.00616.68
7.4.160.0110.00516.68
7.4.150.0130.00016.75
7.4.140.0000.00916.71
7.4.130.0020.00516.66
7.4.120.0040.00416.66
7.4.110.0070.00016.50
7.4.100.0030.00316.72
7.4.90.0050.00316.58
7.4.80.0070.00016.59
7.4.70.0040.00416.66
7.4.60.0040.00416.66
7.4.50.0050.00216.60
7.4.40.0000.00816.42
7.4.30.0000.00716.61
7.4.20.0000.00816.56
7.4.10.0000.00716.70
7.4.00.0090.00016.66

preferences:
49.6 ms | 400 KiB | 5 Q