3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = date_create("12:45:00"); $date2 = date_create("11:00:00"); $diff=date_diff($date1,$date2); echo "Difference in Hours\n"; echo $diff->format("%R%H hours")."\n"; echo "Difference in Minutes\n"; echo $diff->format("%R%i minutes");

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.70.0120.00616.88
8.3.60.0100.01018.27
8.3.50.0080.01122.76
8.3.40.0100.01018.93
8.3.30.0090.00618.84
8.3.20.0040.00420.25
8.3.10.0040.00420.37
8.3.00.0050.00320.64
8.2.190.0130.00718.54
8.2.180.0150.00625.92
8.2.170.0120.00619.03
8.2.160.0100.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0050.00319.31
8.2.120.0030.00526.35
8.2.110.0000.00919.27
8.2.100.0000.01219.66
8.2.90.0050.00319.21
8.2.80.0080.00017.97
8.2.70.0000.01017.63
8.2.60.0080.00018.05
8.2.50.0030.00518.09
8.2.40.0040.00420.53
8.2.30.0040.00419.37
8.2.20.0020.00517.87
8.2.10.0040.00418.06
8.2.00.0040.00417.92
8.1.280.0120.00625.92
8.1.270.0140.00322.07
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0040.00817.60
8.1.230.0060.00617.70
8.1.220.0000.00817.88
8.1.210.0050.00518.77
8.1.200.0100.00017.60
8.1.190.0000.00817.48
8.1.180.0030.00518.10
8.1.170.0000.00818.70
8.1.160.0080.00020.69
8.1.150.0040.00418.96
8.1.140.0000.00819.54
8.1.130.0000.00717.54
8.1.120.0040.00417.55
8.1.110.0040.00417.67
8.1.100.0040.00317.53
8.1.90.0000.00717.54
8.1.80.0060.00317.55
8.1.70.0000.00717.64
8.1.60.0030.00517.61
8.1.50.0050.00317.68
8.1.40.0000.00717.52
8.1.30.0030.00617.72
8.1.20.0040.00417.54
8.1.10.0050.00317.67
8.1.00.0000.00817.64
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0070.00018.51
8.0.270.0030.00317.29
8.0.260.0030.00317.00
8.0.250.0070.00017.17
8.0.240.0040.00417.19
8.0.230.0000.00717.10
8.0.220.0030.00316.97
8.0.210.0040.00417.07
8.0.200.0060.00017.20
8.0.190.0000.00817.14
8.0.180.0070.00417.05
8.0.170.0000.00717.09
8.0.160.0050.00217.10
8.0.150.0040.00316.93
8.0.140.0060.00617.04
8.0.130.0030.00415.80
8.0.120.0000.00817.02
8.0.110.0030.00317.07
8.0.100.0000.00816.88
8.0.90.0080.00017.07
8.0.80.0040.01417.03
8.0.70.0040.00417.00
8.0.60.0070.00016.93
8.0.50.0040.00416.92
8.0.30.0090.00717.13
8.0.20.0100.00717.32
8.0.10.0030.01017.19
8.0.00.0070.01116.89
7.4.330.0000.00616.84
7.4.320.0000.00616.67
7.4.300.0030.00316.66
7.4.290.0030.00716.49
7.4.280.0070.00016.68
7.4.270.0000.00716.46
7.4.260.0080.00016.57
7.4.250.0050.00316.48
7.4.240.0000.00716.72
7.4.230.0070.00016.70
7.4.220.0110.00716.78
7.4.210.0110.00616.57
7.4.200.0000.00716.48
7.4.160.0100.00516.62
7.4.150.0120.00417.04
7.4.140.0080.00917.42
7.4.130.0130.00516.48
7.4.120.0130.00716.64
7.4.110.0090.00516.57
7.4.100.0090.00616.72
7.4.90.0110.00416.58
7.4.80.0080.00718.01
7.4.70.0080.01216.47
7.4.60.0070.00916.56
7.4.50.0070.01016.36
7.4.40.0070.00816.48
7.4.30.0060.00916.62
7.4.20.0030.01016.57
7.4.10.0110.00315.64
7.4.00.0050.01115.47
7.3.330.0060.00013.15
7.3.320.0050.00013.28
7.3.310.0070.00016.32
7.3.300.0070.00016.37
7.3.290.0070.00016.32
7.3.280.0080.00916.33
7.3.270.0110.00516.85
7.3.260.0090.00616.34
7.3.250.0030.00916.29
7.3.240.0060.01216.43
7.3.230.0090.00616.37
7.3.220.0030.01016.36
7.3.210.0100.00616.46
7.3.200.0140.00416.35
7.3.190.0060.01116.31
7.3.180.0060.00916.44
7.3.170.0100.00916.35
7.3.160.0060.00916.32
7.3.150.0030.00916.33
7.3.140.0030.01016.32
7.3.130.0090.00515.61
7.3.120.0120.00515.58
7.3.110.0090.00715.59
7.3.100.0080.00915.67
7.3.90.0100.00815.58
7.3.80.0100.00515.25
7.3.70.0100.00615.19
7.3.60.0090.00615.35
7.3.50.0090.00615.38
7.3.40.0090.00515.32
7.3.30.0100.00615.31
7.3.20.0040.01216.06
7.3.10.0110.00615.95
7.3.00.0110.00615.93
7.2.340.0150.00816.54
7.2.330.0120.01216.53
7.2.320.0140.00816.68
7.2.310.0120.00916.59
7.2.300.0120.01016.66
7.2.290.0100.01116.54
7.2.280.0150.00916.58
7.2.270.0170.00716.65
7.2.260.0120.00815.85
7.2.250.0130.00815.76
7.2.240.0150.00615.60
7.2.230.0110.01015.86
7.2.220.0150.00615.71
7.2.210.0100.01215.71
7.2.200.0090.01115.45
7.2.190.0140.00615.50
7.2.180.0110.00715.47
7.2.170.0090.01015.64
7.2.160.0150.00615.50
7.2.150.0130.00816.17
7.2.140.0070.01216.29
7.2.130.0370.00516.31
7.2.120.0280.00916.30
7.2.110.0120.00916.30
7.2.100.0100.01216.30
7.2.90.0120.01016.18
7.2.80.0190.01016.32
7.2.70.0120.00816.27
7.2.60.0170.00716.25
7.2.50.0220.00316.29
7.2.40.0170.00616.27
7.2.30.0080.01116.33
7.2.20.0160.00716.08
7.2.10.0110.00816.41
7.2.00.0170.01016.16
7.1.330.0180.01214.72
7.1.320.0190.00414.90
7.1.310.0090.01015.14
7.1.300.0100.01015.29
7.1.290.0110.00715.23
7.1.280.0160.00615.19
7.1.270.0120.00915.19
7.1.260.0140.00515.19
7.1.250.0130.00914.99
7.1.240.0150.00815.09
7.1.230.0150.00815.03
7.1.220.0160.00715.26
7.1.210.0120.01315.18
7.1.200.0190.00615.17
7.1.190.0210.00515.18
7.1.180.0160.00715.03
7.1.170.0200.00715.16
7.1.160.0160.00715.08
7.1.150.0160.00515.25
7.1.140.0150.00615.17
7.1.130.0160.00715.00
7.1.120.0130.00815.16
7.1.110.0090.01415.25
7.1.100.0150.00615.15
7.1.90.0160.00815.20
7.1.80.0160.00615.04
7.1.70.0160.00615.14
7.1.60.0180.00314.95
7.1.50.0260.00314.52
7.1.40.0160.00815.17
7.1.30.0150.00615.11
7.1.20.0130.00815.04
7.1.10.0150.00815.22
7.1.00.0160.00715.13
7.0.330.0160.00814.60
7.0.320.0160.00814.77
7.0.310.0180.01014.75
7.0.300.0150.00814.72
7.0.290.0130.00814.85
7.0.280.0130.00814.82
7.0.270.0190.00314.72
7.0.260.0130.01114.79
7.0.250.0160.00714.73
7.0.240.0120.00814.94
7.0.230.0160.00814.94
7.0.220.0150.00714.79
7.0.210.0150.00914.79
7.0.200.0140.00614.74
7.0.190.0130.00714.76
7.0.180.0150.01114.75
7.0.170.0140.00714.77
7.0.160.0170.00914.77
7.0.150.0180.00614.89
7.0.140.0170.00514.77
7.0.130.0180.00814.99
7.0.120.0120.01014.91
7.0.110.0180.00414.91
7.0.100.0230.00614.72
7.0.90.0170.00614.77
7.0.80.0160.00714.61
7.0.70.0150.00914.81
7.0.60.0160.00714.67
7.0.50.0110.00914.86
7.0.40.0130.00914.93
7.0.30.0190.01014.91
7.0.20.0490.00914.44
7.0.10.0640.00614.61
7.0.00.0450.00714.56
5.6.400.0160.01215.03
5.6.390.0230.00215.00
5.6.380.0150.00814.89
5.6.370.0160.00614.97
5.6.360.0150.00614.86
5.6.350.0170.00514.92
5.6.340.0180.00414.85
5.6.330.0150.00714.85
5.6.320.0140.00914.83
5.6.310.0150.00814.96
5.6.300.0200.01014.93
5.6.290.0130.01114.93
5.6.280.0110.01015.01
5.6.270.0130.01015.02
5.6.260.0180.00714.90
5.6.250.0150.00714.85
5.6.240.0110.01214.95
5.6.230.0140.00914.91
5.6.220.0130.00914.95
5.6.210.0150.00914.81
5.6.200.0150.00814.85
5.6.190.0170.00614.87
5.6.180.0140.01015.00
5.6.170.0120.00814.77
5.6.160.0120.00914.76
5.6.150.0130.00814.87
5.6.140.0120.01014.82
5.6.130.0140.00814.73
5.6.120.0140.00514.76
5.6.110.0110.00714.84
5.6.100.0120.00914.75
5.6.90.0090.01114.71
5.6.80.0160.00414.66
5.6.70.0130.00714.75
5.6.60.0160.00614.69
5.6.50.0140.00714.63
5.6.40.0100.00614.70
5.6.30.0110.01014.67
5.6.20.0140.00814.70
5.6.10.0140.00814.62
5.6.00.0190.00614.71
5.5.380.0150.00814.90
5.5.370.0150.00714.79
5.5.360.0190.00214.87
5.5.350.0140.00814.76
5.5.340.0120.01014.74
5.5.330.0100.01114.68
5.5.320.0130.00814.81
5.5.310.0130.00613.91
5.5.300.0130.00513.77
5.5.290.0160.00513.94
5.5.280.0100.00813.85
5.5.270.0140.00713.89
5.5.260.0100.00813.87
5.5.250.0140.00913.99
5.5.240.0120.00713.89
5.5.230.0100.00813.93
5.5.220.0110.01013.73
5.5.210.0140.00513.94
5.5.200.0090.01013.87
5.5.190.0100.01013.83
5.5.180.0120.01013.98
5.5.170.0120.00914.77
5.5.160.0120.01013.76
5.5.150.0140.00713.80
5.5.140.0100.00913.84
5.5.130.0110.00813.74
5.5.120.0160.00513.88
5.5.110.0130.00713.86
5.5.100.0140.00713.82
5.5.90.0090.01013.97
5.5.80.0100.00913.82
5.5.70.0140.00413.93
5.5.60.0090.01013.73
5.5.50.0150.00413.80
5.5.40.0130.00513.86
5.5.30.0100.01113.89
5.5.20.0150.00713.84
5.5.10.0130.00613.89
5.5.00.0100.00913.93

preferences:
30.72 ms | 401 KiB | 5 Q