3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/New_York'); $date = new DateTime(); echo json_encode($date,JSON_FORCE_OBJECT); var_dump(json_last_error(), json_last_error_msg()); function check($name) { $o = new $name('now', new DateTimeZone('UTC')); echo json_encode($o); $s = serialize($o); echo json_encode($s); var_dump(isset($o2->_date_time) === false); } check('DateTime'); class A extends DateTime {} check('A');

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.0140.00416.38
8.3.50.0080.00822.03
8.3.40.0130.00618.84
8.3.30.0140.00019.07
8.3.20.0040.00420.04
8.3.10.0050.00323.66
8.3.00.0050.00219.01
8.2.180.0150.00318.54
8.2.170.0140.00322.96
8.2.160.0070.00720.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0020.00520.47
8.2.110.0160.00719.30
8.2.100.0080.00317.91
8.2.90.0000.00819.25
8.2.80.0040.00417.97
8.2.70.0000.00917.88
8.2.60.0000.01118.04
8.2.50.0000.00818.10
8.2.40.0050.00519.83
8.2.30.0000.00718.23
8.2.20.0080.00017.93
8.2.10.0040.00418.02
8.2.00.0020.00517.75
8.1.280.0120.00325.92
8.1.270.0060.00323.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.05
8.1.230.0070.00417.89
8.1.220.0060.00317.77
8.1.210.0050.00318.77
8.1.200.0060.00317.47
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0040.00418.66
8.1.160.0000.00721.87
8.1.150.0030.00618.69
8.1.140.0000.00717.52
8.1.130.0000.00717.77
8.1.120.0070.00017.52
8.1.110.0040.00417.69
8.1.100.0050.00217.46
8.1.90.0040.00417.61
8.1.80.0000.00817.65
8.1.70.0000.00717.48
8.1.60.0000.00917.73
8.1.50.0040.00417.52
8.1.40.0050.00317.57
8.1.30.0000.00917.84
8.1.20.0000.00817.79
8.1.10.0070.00017.68
8.1.00.0000.00817.55
8.0.300.0000.00718.77
8.0.290.0030.00516.88
8.0.280.0000.00718.49
8.0.270.0000.00717.19
8.0.260.0000.00717.31
8.0.250.0030.00317.15
8.0.240.0050.00317.21
8.0.230.0000.00716.98
8.0.220.0070.00016.90
8.0.210.0000.00816.97
8.0.200.0040.00416.96
8.0.190.0040.00417.05
8.0.180.0070.00017.06
8.0.170.0030.00617.07
8.0.160.0070.00017.08
8.0.150.0040.00417.02
8.0.140.0040.00416.93
8.0.130.0030.00313.38
8.0.120.0000.00817.00
8.0.110.0040.00416.88
8.0.100.0060.00316.94
8.0.90.0000.00816.95
8.0.80.0000.01617.04
8.0.70.0040.00416.84
8.0.60.0000.00716.89
8.0.50.0030.00516.95
8.0.30.0120.01017.34
8.0.20.0060.01317.42
8.0.10.0080.00017.10
8.0.00.0090.00916.91
7.4.330.0030.00315.21
7.4.320.0000.00616.73
7.4.300.0000.00716.63
7.4.290.0030.00316.72
7.4.280.0070.00016.76
7.4.270.0040.00416.70
7.4.260.0030.00316.64
7.4.250.0070.00016.69
7.4.240.0050.00316.66
7.4.230.0000.00716.52
7.4.220.0070.01116.83
7.4.210.0090.00916.66
7.4.200.0000.00716.72
7.4.190.0000.00716.53
7.4.160.0060.01216.55
7.4.150.0070.01117.40
7.4.140.0110.00617.86
7.4.130.0100.01016.70
7.4.120.0050.01216.72
7.4.110.0090.01216.82
7.4.100.0150.00416.56
7.4.90.0080.00916.82
7.4.80.0070.01019.39
7.4.70.0030.01616.67
7.4.60.0030.01316.63
7.4.50.0030.00516.48
7.4.40.0070.01016.55
7.4.30.0080.00816.47
7.4.00.0000.01615.09
7.3.330.0000.00513.58
7.3.320.0000.00513.49
7.3.310.0040.00416.39
7.3.300.0070.00016.56
7.3.290.0050.01616.49
7.3.280.0030.01516.56
7.3.270.0140.00317.40
7.3.260.0030.01616.54
7.3.250.0120.00816.70
7.3.240.0000.01816.60
7.3.230.0140.00316.59
7.3.210.0100.00716.66
7.3.200.0120.01219.39
7.3.190.0130.00616.57
7.3.180.0060.01216.56
7.3.170.0110.00516.50
7.3.160.0040.01216.75
7.3.120.0060.00714.82
7.2.330.0110.00717.00
7.2.320.0090.00916.75
7.2.310.0070.01016.57
7.2.300.0050.01416.93
7.2.290.0000.01716.86
7.2.60.0100.00616.88
7.1.200.0000.01215.68
7.1.100.0060.00918.27
7.1.70.0030.00717.12
7.1.60.0060.01019.46
7.1.50.0060.02217.10
7.1.00.0070.07322.43
7.0.200.0000.00717.19
7.0.140.0030.07321.95
7.0.90.0070.05019.95
7.0.80.0130.06319.88
7.0.70.0530.07319.95
7.0.60.0500.04719.98
7.0.50.0800.07320.14
7.0.40.0030.09320.00
7.0.30.0000.09320.17
7.0.20.0100.08320.05
7.0.10.0030.04719.95
7.0.00.0030.05019.95
5.6.280.0070.07020.93
5.6.240.0130.07320.52
5.6.230.0070.08720.73
5.6.220.0130.07320.65
5.6.210.0000.04320.61
5.6.200.0000.05321.02
5.6.190.0200.07321.09
5.6.180.0070.08021.05
5.6.170.0070.04321.09
5.6.160.0030.05321.01
5.6.150.0070.08021.05
5.6.140.0070.05021.03
5.6.130.0030.04721.11
5.6.120.0070.08721.05
5.6.110.0100.08021.09
5.6.100.0070.05020.93
5.6.90.0070.04320.94
5.6.80.0100.06320.43
5.6.70.0000.08020.43
5.6.60.0070.05320.52
5.6.50.0070.04320.41
5.6.40.0130.07720.32
5.6.30.0100.07020.47
5.6.20.0070.04020.49
5.6.10.0130.08020.44
5.6.00.0030.04320.31
5.5.380.0070.08020.56
5.5.370.0130.07020.37
5.5.360.0170.07020.42
5.5.350.0000.06020.45
5.5.340.0030.04020.65
5.5.330.0200.07020.65
5.5.320.0030.05720.88
5.5.310.0130.03320.92
5.5.300.0070.05020.65
5.5.290.0100.09020.92
5.5.280.0130.08020.94
5.5.270.0000.06320.92
5.5.260.0100.07320.92
5.5.250.0100.08020.58
5.5.240.0070.06720.32
5.5.230.0000.06320.12
5.5.220.0030.06020.03
5.5.210.0100.07720.27
5.5.200.0130.07320.13
5.5.190.0170.03020.23
5.5.180.0100.03720.26
5.5.160.0070.07720.26
5.5.150.0100.07320.17
5.5.140.0030.05320.21
5.5.130.0100.04720.29
5.5.120.0030.04720.16
5.5.110.0170.07020.18
5.5.100.0030.08319.99
5.5.90.0030.06020.12
5.5.80.0000.05020.08
5.5.70.0000.07719.97
5.5.60.0030.05020.09
5.5.50.0100.05720.06
5.5.40.0130.07020.04
5.5.30.0070.08020.16
5.5.20.0100.05320.04
5.5.10.0130.07020.04
5.5.00.0070.06320.01
5.4.450.0000.04719.36
5.4.440.0130.07319.38
5.4.430.0030.04319.50
5.4.420.0200.03319.50
5.4.410.0100.05019.36
5.4.400.0030.05019.04
5.4.390.0130.03719.03
5.4.380.0030.05318.96
5.4.370.0170.06719.23
5.4.360.0030.06019.16
5.4.350.0030.04019.08
5.4.340.0000.04318.86
5.4.320.0100.07719.14
5.4.310.0030.04319.09
5.4.300.0130.04019.21
5.4.290.0100.07019.14
5.4.280.0100.07719.21
5.4.270.0030.08319.15
5.4.260.0070.07719.04
5.4.250.0070.07719.04
5.4.240.0030.08019.22
5.4.230.0030.06018.94
5.4.220.0000.04719.16
5.4.210.0030.05319.04
5.4.200.0100.06018.86
5.4.190.0070.05719.02
5.4.180.0030.04019.15
5.4.170.0030.07019.09
5.4.160.0100.08019.14
5.4.150.0030.08319.12
5.4.140.0170.04316.42
5.4.130.0070.05016.42
5.4.120.0070.07016.41
5.4.110.0100.06716.45
5.4.100.0070.04316.52
5.4.90.0130.06716.53
5.4.80.0030.07016.51
5.4.70.0070.07316.52
5.4.60.0000.08016.35
5.4.50.0230.06716.36
5.4.40.0130.07016.50
5.4.30.0170.06716.46
5.4.20.0030.05016.43
5.4.10.0030.04316.36
5.4.00.0100.03715.81
5.3.290.0070.04714.70
5.3.280.0070.07714.54
5.3.270.0100.06014.75
5.3.260.0070.07714.73
5.3.250.0030.06014.64
5.3.240.0070.08014.68
5.3.230.0100.03314.71
5.3.220.0070.07014.60
5.3.210.0100.07314.55
5.3.200.0030.07714.55
5.3.190.0130.07014.69
5.3.180.0070.05714.69
5.3.170.0100.06714.60
5.3.160.0100.07314.59
5.3.150.0000.08014.56
5.3.140.0030.08714.65
5.3.130.0070.08014.48
5.3.120.0070.07314.62
5.3.110.0030.07714.66
5.3.100.0070.03714.05
5.3.90.0170.03014.08
5.3.80.0070.03313.91
5.3.70.0000.04014.16
5.3.60.0070.03314.13
5.3.50.0030.03713.88
5.3.40.0030.03713.94
5.3.30.0030.04013.84
5.3.20.0000.06713.68
5.3.10.0170.01713.59
5.3.00.0030.03313.56
5.2.170.0070.03311.20
5.2.160.0030.03011.02
5.2.150.0070.02311.21
5.2.140.0070.02711.06
5.2.130.0000.03011.24
5.2.120.0030.02711.13
5.2.110.0000.06711.16
5.2.100.0000.03711.15
5.2.90.0000.03011.20
5.2.80.0030.02711.08
5.2.70.0000.04310.98
5.2.60.0000.03011.14
5.2.50.0030.06711.09
5.2.40.0030.04311.10
5.2.30.0030.04711.06
5.2.20.0000.03010.95
5.2.10.0070.02310.98
5.2.00.0000.03010.62
5.1.60.0000.04010.01
5.1.50.0030.02310.09
5.1.40.0000.0239.93
5.1.30.0000.02710.39
5.1.20.0030.02010.36
5.1.10.0000.02710.14
5.1.00.0030.02310.08
5.0.50.0000.0308.39
5.0.40.0000.0178.41
5.0.30.0030.0278.30
5.0.20.0000.0178.27
5.0.10.0030.0208.02
5.0.00.0030.0238.15
4.4.90.0030.0307.44
4.4.80.0030.0277.44
4.4.70.0000.0137.44
4.4.60.0000.0307.44
4.4.50.0000.0177.44
4.4.40.0030.0207.44
4.4.30.0000.0177.44
4.4.20.0000.0207.44
4.4.10.0000.0177.44
4.4.00.0000.0637.44
4.3.110.0000.0177.44
4.3.100.0000.0137.44
4.3.90.0000.0137.44
4.3.80.0000.0237.44
4.3.70.0030.0177.44
4.3.60.0030.0137.44
4.3.50.0030.0137.44
4.3.40.0000.0277.44
4.3.30.0000.0177.44
4.3.20.0000.0177.44
4.3.10.0000.0337.44
4.3.00.0000.0137.44

preferences:
50.8 ms | 401 KiB | 5 Q