3v4l.org

run code in 300+ PHP versions simultaneously
<?php function buildDatetime($time, $now, $zone) { $datetime = new \DateTime(); $datetime->setTimestamp(strtotime($time, $now)); $datetime->setTimezone(new DateTimezone($zone)); return $datetime; } $now = new \DateTime('2000-01-02 00:00:00', new \DateTimeZone('UTC')); date_default_timezone_set('America/Los_Angeles'); $date = buildDatetime('yesterday', $now->getTimestamp(), 'UTC'); var_dump($date->format('c'), $date->getTimezone()->getName());

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.60.0150.00018.43
8.3.50.0110.00718.11
8.3.40.0120.00318.80
8.3.30.0040.01118.93
8.3.20.0070.00719.07
8.3.10.0000.00821.77
8.3.00.0000.00819.06
8.2.180.0140.00716.88
8.2.170.0070.00722.96
8.2.160.0080.00622.16
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00318.03
8.2.120.0080.00026.35
8.2.110.0080.00319.30
8.2.100.0060.00618.04
8.2.90.0050.00319.13
8.2.80.0000.00917.97
8.2.70.0050.00317.63
8.2.60.0000.00917.92
8.2.50.0070.00318.09
8.2.40.0000.00720.62
8.2.30.0040.00419.46
8.2.20.0030.00617.91
8.2.10.0000.00718.13
8.2.00.0040.00418.12
8.1.280.0170.00325.92
8.1.270.0080.00023.96
8.1.260.0070.00728.09
8.1.250.0040.00428.09
8.1.240.0030.00622.73
8.1.230.0090.00317.96
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0000.01017.48
8.1.190.0060.00317.25
8.1.180.0030.00618.10
8.1.170.0030.00618.65
8.1.160.0030.00520.98
8.1.150.0070.00018.93
8.1.140.0040.00419.57
8.1.130.0030.00317.63
8.1.120.0000.00717.52
8.1.110.0050.00517.50
8.1.100.0020.00517.65
8.1.90.0050.00317.57
8.1.80.0000.00717.51
8.1.70.0070.00017.65
8.1.60.0050.00317.75
8.1.50.0050.00317.65
8.1.40.0080.00017.67
8.1.30.0030.00717.77
8.1.20.0000.00817.81
8.1.10.0030.00617.67
8.1.00.0050.00517.65
8.0.300.0070.00018.77
8.0.290.0070.00016.88
8.0.280.0040.00418.46
8.0.270.0000.00717.21
8.0.260.0030.00317.21
8.0.250.0000.00717.02
8.0.240.0040.00417.09
8.0.230.0030.00317.11
8.0.220.0040.00416.94
8.0.210.0000.00917.07
8.0.200.0000.00717.16
8.0.190.0000.00716.99
8.0.180.0040.00416.94
8.0.170.0040.00417.09
8.0.160.0040.00417.06
8.0.150.0070.00017.01
8.0.140.0040.00416.92
8.0.130.0000.00613.39
8.0.120.0000.00817.00
8.0.110.0050.00316.88
8.0.100.0040.00417.05
8.0.90.0070.00016.95
8.0.80.0030.01316.92
8.0.70.0070.00017.02
8.0.60.0030.00616.91
8.0.50.0000.00817.05
8.0.30.0090.01117.19
8.0.20.0070.01217.40
8.0.10.0040.00417.15
8.0.00.0080.00816.82
7.4.330.0040.00015.08
7.4.320.0000.00616.60
7.4.300.0030.00316.68
7.4.290.0000.00716.69
7.4.280.0000.00716.67
7.4.270.0040.00416.64
7.4.260.0090.00016.62
7.4.250.0020.00516.63
7.4.240.0070.00016.69
7.4.230.0000.00716.62
7.4.220.0170.00616.60
7.4.210.0100.00316.77
7.4.200.0000.00716.74
7.4.160.0090.00616.73
7.4.150.0070.01017.40
7.4.140.0120.00917.86
7.4.130.0090.00916.58
7.4.120.0050.01116.59
7.4.110.0090.00816.72
7.4.100.0120.00416.35
7.4.90.0100.00716.45
7.4.80.0110.01119.39
7.4.70.0110.00616.65
7.4.60.0070.01016.75
7.4.50.0110.00616.60
7.4.40.0130.01016.59
7.4.30.0080.00816.41
7.4.00.0100.00515.12
7.3.330.0020.00513.45
7.3.320.0030.00313.44
7.3.310.0050.00216.29
7.3.300.0060.00016.35
7.3.290.0100.00716.45
7.3.280.0120.00816.40
7.3.270.0060.01217.40
7.3.260.0140.00816.53
7.3.250.0100.00716.42
7.3.240.0090.00716.55
7.3.230.0150.00316.48
7.3.210.0090.01316.48
7.3.200.0070.01016.53
7.3.190.0100.00716.42
7.3.180.0110.00616.39
7.3.170.0130.00316.68
7.3.160.0100.00616.78
7.3.120.0030.01615.11
7.3.110.0090.00914.83
7.3.100.0120.00314.83
7.3.90.0060.00614.85
7.3.80.0080.00314.98
7.3.70.0060.00914.80
7.3.60.0040.01115.02
7.3.50.0080.00615.11
7.3.40.0090.00615.02
7.3.30.0000.00915.02
7.3.20.0080.00616.85
7.3.10.0060.01016.72
7.3.00.0080.00716.72
7.2.330.0060.01216.48
7.2.320.0040.01416.58
7.2.310.0090.00916.86
7.2.300.0060.01216.94
7.2.290.0060.01116.67
7.2.250.0070.01014.91
7.2.240.0070.01015.06
7.2.230.0100.00014.63
7.2.220.0070.00714.94
7.2.210.0040.00815.02
7.2.200.0090.00615.28
7.2.190.0080.00415.13
7.2.180.0090.00915.05
7.2.170.0030.01415.20
7.2.130.0040.01116.97
7.2.120.0090.01117.02
7.2.110.0090.00616.84
7.2.100.0080.00516.89
7.2.90.0090.00616.88
7.2.80.0100.00316.99
7.2.70.0090.00616.86
7.2.60.0110.00617.05
7.2.50.0070.01017.17
7.2.40.0070.01117.00
7.2.30.0070.01417.17
7.2.20.0090.01216.89
7.2.10.0090.01317.12
7.2.00.0120.00618.07
7.1.330.0070.00715.70
7.1.320.0000.01715.63
7.1.310.0060.00615.77
7.1.300.0000.01816.03
7.1.290.0040.01415.66
7.1.280.0090.00615.94
7.1.270.0030.00615.52
7.1.260.0130.00015.84
7.1.250.0090.00615.96
7.1.200.0030.00915.93
7.1.100.0150.00718.13
7.1.70.0030.00617.47
7.1.60.0070.01819.85
7.1.00.0070.07322.30
7.0.200.0350.00414.85
7.0.60.0730.00020.11
7.0.50.0770.00020.46
7.0.40.0930.00020.38
7.0.30.0830.00020.43
7.0.20.0900.00020.34
7.0.10.0730.00020.33
7.0.00.0870.00020.36
5.6.280.0070.07020.82
5.6.210.0870.00020.63
5.6.200.0770.00021.21
5.6.190.0770.00021.04
5.6.180.0800.00021.08
5.6.170.0670.00020.96
5.6.160.0730.00021.07
5.6.150.0730.00021.18
5.6.140.0730.00020.98
5.6.130.0870.00021.05
5.6.120.0930.00021.18
5.6.110.0870.00021.03
5.6.100.1100.00021.02
5.6.90.1330.00021.04
5.6.80.1130.00020.53
5.6.70.1270.00020.59
5.6.60.0900.00020.55
5.6.50.0970.00020.46
5.6.40.1030.00020.44
5.6.30.1130.00020.34
5.6.20.1030.00020.46
5.6.10.1000.00020.31
5.6.00.0930.00020.37
5.5.350.0730.00020.37
5.5.340.0770.00020.88
5.5.330.0800.00021.00
5.5.320.0730.00020.79
5.5.310.0730.00020.77
5.5.300.0730.00020.86
5.5.290.0770.00020.85
5.5.280.0730.00020.72
5.5.270.1070.00020.83
5.5.260.1200.00020.86
5.5.250.1100.00020.75
5.5.240.1270.00020.19
5.5.230.1030.00020.18
5.5.220.0930.00020.18
5.5.210.1070.00020.41
5.5.200.1170.00020.07
5.5.190.1070.00020.38
5.5.180.1100.00020.05
5.5.160.0930.00020.22
5.5.150.0870.00020.29
5.5.140.0970.00020.30
5.5.130.0900.00020.34
5.5.120.0930.00020.38
5.5.110.0930.00020.21
5.5.100.1230.00020.14
5.5.90.1000.00020.20
5.5.80.1070.00019.95
5.5.70.1100.00020.18
5.5.60.0670.00020.09
5.5.50.0870.00020.09
5.5.40.0730.00020.12
5.5.30.0700.00020.06
5.5.20.0730.00020.15
5.5.10.0730.00020.12
5.5.00.0830.00020.07

preferences:
44.17 ms | 401 KiB | 5 Q