3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(); $midnight = clone $now; $midnight ->add(new DateInterval('P1D')) ->setTime(0, 0, 0) ; $difference = $midnight->diff($now); var_dump($difference);

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.0.110.0030.00617.04
8.0.100.0070.00016.81
8.0.90.0070.00016.93
8.0.80.0140.01016.96
8.0.70.0000.00716.89
8.0.60.0050.00216.98
8.0.50.0000.00816.98
8.0.30.0110.00516.96
8.0.20.0130.00717.40
8.0.10.0040.00417.26
8.0.00.0100.01116.91
7.4.240.0030.00416.61
7.4.230.0040.00416.78
7.4.220.0090.00916.69
7.4.210.0110.00716.62
7.4.200.0030.00316.50
7.4.160.0070.01016.54
7.4.150.0150.00317.40
7.4.140.0140.00817.86
7.4.130.0100.00916.51
7.4.120.0130.00616.57
7.4.110.0000.01716.42
7.4.100.0160.00316.69
7.4.90.0120.00616.55
7.4.80.0070.01019.39
7.4.70.0070.01016.54
7.4.60.0120.00516.48
7.4.50.0060.01116.50
7.4.40.0060.01116.44
7.4.30.0110.01116.73
7.4.10.0070.01115.06
7.4.00.0080.01115.02
7.3.300.0030.00316.25
7.3.290.0000.00716.33
7.3.280.0110.00816.34
7.3.270.0180.00617.40
7.3.260.0080.00916.53
7.3.250.0080.01116.59
7.3.240.0120.00816.45
7.3.230.0070.01116.51
7.3.210.0130.00316.54
7.3.200.0120.01619.39
7.3.190.0070.01116.51
7.3.180.0070.01016.46
7.3.170.0110.00616.64
7.3.160.0100.00716.48
7.3.130.0080.00815.01
7.3.120.0050.01014.79
7.3.110.0070.01215.00
7.3.100.0090.00715.00
7.3.90.0080.01014.97
7.3.80.0090.00514.72
7.3.70.0030.01014.79
7.3.60.0050.00914.86
7.3.50.0050.00914.73
7.3.40.0090.00314.86
7.3.30.0030.00914.97
7.3.20.0060.00916.59
7.3.10.0030.01016.64
7.3.00.0070.00816.81
7.2.330.0070.01116.35
7.2.320.0030.01516.92
7.2.310.0100.01316.51
7.2.300.0110.01116.43
7.2.290.0030.01316.48
7.2.260.0060.01315.31
7.2.250.0030.01615.02
7.2.240.0050.01015.11
7.2.230.0080.00815.21
7.2.220.0070.00915.06
7.2.210.0050.01215.14
7.2.200.0060.01115.05
7.2.190.0080.00815.13
7.2.180.0030.01114.97
7.2.170.0080.00815.16
7.2.160.0070.01015.12
7.2.150.0060.00917.00
7.2.140.0060.00716.77
7.2.130.0090.00917.03
7.2.120.0050.01017.07
7.2.110.0040.01116.99
7.2.100.0040.01116.89
7.2.90.0120.00416.84
7.2.80.0020.01316.94
7.2.70.0090.00616.82
7.2.60.0040.01216.99
7.2.50.0050.01116.93
7.2.40.0090.00517.06
7.2.30.0060.00617.19
7.2.20.0070.00716.92
7.2.10.0080.00817.01
7.2.00.0070.00717.86
7.1.330.0060.01115.86
7.1.320.0030.01215.84
7.1.310.0100.00315.91
7.1.300.0100.00715.98
7.1.290.0080.00716.02
7.1.280.0090.00615.78
7.1.270.0060.00815.86
7.1.260.0030.00615.81
7.1.250.0060.00715.88
7.1.240.0060.00615.84
7.1.230.0090.00615.94
7.1.220.0090.00715.72
7.1.210.0040.00815.71
7.1.200.0090.00615.73
7.1.190.0070.00516.07
7.1.180.0050.01015.96
7.1.170.0080.00315.88
7.1.160.0070.00715.72
7.1.150.0030.00815.87
7.1.140.0050.01115.73
7.1.130.0040.00715.98
7.1.120.0020.01015.96
7.1.110.0060.00615.88
7.1.100.0050.01016.77
7.1.90.0060.00615.74
7.1.80.0090.00615.98
7.1.70.0070.00416.30
7.1.60.0110.00416.97
7.1.50.0090.00816.17
7.1.40.0020.00915.88
7.1.30.0050.00715.83
7.1.20.0060.00615.78
7.1.10.0050.00815.83
7.1.00.0070.02917.98
7.0.330.0080.00815.51
7.0.320.0020.00915.38
7.0.310.0030.00915.36
7.0.300.0080.00515.41
7.0.290.0040.01015.26
7.0.280.0030.00815.50
7.0.270.0050.00715.65
7.0.260.0080.00615.57
7.0.250.0010.01015.54
7.0.240.0050.00515.49
7.0.230.0070.00915.65
7.0.220.0020.01115.53
7.0.210.0030.00815.39
7.0.200.0040.00615.95
7.0.190.0070.00715.52
7.0.180.0090.00115.55
7.0.170.0040.00815.50
7.0.160.0060.00615.54
7.0.150.0060.00915.50
7.0.140.0060.00515.35
7.0.130.0040.00915.49
7.0.120.0100.00315.68
7.0.110.0070.00715.56
7.0.100.0080.01015.37
7.0.90.0020.00815.23
7.0.80.0020.01015.54
7.0.70.0050.00515.58
7.0.60.0120.02517.67
7.0.50.0070.02916.22
7.0.40.0050.02815.82
7.0.30.0180.02515.89
7.0.20.0170.02415.76
7.0.10.0080.02015.79
7.0.00.0080.02815.75
5.6.400.0080.00314.48
5.6.390.0090.00514.19
5.6.380.0060.00614.31
5.6.370.0050.00514.42
5.6.360.0080.00714.38
5.6.350.0090.00614.51
5.6.340.0050.00814.38
5.6.330.0040.00914.28
5.6.320.0030.01014.34
5.6.310.0070.00714.34
5.6.300.0040.00714.55
5.6.290.0010.00814.21
5.6.280.0030.02616.61
5.6.270.0080.00614.41
5.6.260.0070.00514.56
5.6.250.0050.00614.36
5.6.240.0070.00714.40
5.6.230.0100.00514.28
5.6.220.0020.01014.32
5.6.210.0060.02316.45
5.6.200.0040.02315.72
5.6.190.0060.03216.50
5.6.180.0180.01616.37
5.6.170.0070.02216.47
5.6.160.0040.02516.38
5.6.150.0090.03115.55
5.6.140.0040.02015.59
5.6.130.0020.03215.51
5.6.120.0060.03516.61
5.6.110.0070.03016.78
5.6.100.0090.02516.53
5.6.90.0030.03016.51
5.6.80.0090.02916.40
5.6.70.0070.00714.29
5.6.60.0050.00814.36
5.6.50.0030.01214.37
5.6.40.0060.00814.33
5.6.30.0030.01014.29
5.6.20.0040.00914.26
5.6.10.0040.01214.52
5.6.00.0080.00714.24
5.5.380.0080.00514.24
5.5.370.0050.00814.23
5.5.360.0040.00714.44
5.5.350.0110.01816.37
5.5.340.0080.02715.68
5.5.330.0050.01816.20
5.5.320.0170.02916.14
5.5.310.0080.02516.21
5.5.300.0030.02815.57
5.5.290.0070.02715.60
5.5.280.0070.03016.49
5.5.270.0080.02816.54
5.5.260.0090.01716.46
5.5.250.0080.03116.29
5.5.240.0070.02916.21
5.5.230.0040.00814.20
5.5.220.0070.00514.33
5.5.210.0050.01214.25
5.5.200.0040.00714.36
5.5.190.0080.00514.17
5.5.180.0020.01214.28
5.5.170.0030.01214.36
5.5.160.0060.00814.29
5.5.150.0020.01114.19
5.5.140.0050.00514.36
5.5.130.0090.00414.35
5.5.120.0060.00614.07
5.5.110.0050.00914.42
5.5.100.0060.00514.04
5.5.90.0060.00514.43
5.5.80.0070.00314.31
5.5.70.0030.00714.23
5.5.60.0040.00614.14
5.5.50.0050.00714.31
5.5.40.0050.00614.21
5.5.30.0020.01114.22
5.5.20.0090.00414.15
5.5.10.0060.00614.46
5.5.00.0040.00614.32

preferences:
39.09 ms | 401 KiB | 5 Q