3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new \DateTime('2006-04-12T12:30:00'); $end = new \DateTime('2006-04-14T11:30:00'); //determine what interval should be used - can change to weeks, months, etc $interval = new \DateInterval('PT1H'); //create periods every hour between the two dates $periods = new \DatePeriod($start, $interval, $end); //count the number of objects within the periods $hours = iterator_count($periods); echo $hours . ' hours' . PHP_EOL; //difference between Unix Epoch $diff = $end->getTimestamp() - $start->getTimestamp(); $hours = $diff / ( 60 * 60 ); echo $hours . ' hours (60 * 60)' . PHP_EOL; //difference between days $diff = $end->diff($start); $hours = $diff->h + ($diff->days * 24); echo $hours . ' hours (days * 24)' . PHP_EOL;

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.4.120.0120.00724.24
8.4.110.0130.00822.79
8.4.100.0070.00218.91
8.4.90.0130.00720.52
8.4.80.0140.00519.61
8.4.70.0130.00718.13
8.4.60.0150.00618.85
8.4.50.0070.00418.08
8.4.40.0060.01319.47
8.4.30.0110.01117.88
8.4.20.0100.01019.08
8.4.10.0040.00419.71
8.3.250.0120.00717.39
8.3.240.0060.01217.29
8.3.230.0110.00817.09
8.3.220.0120.00618.97
8.3.210.0110.00816.83
8.3.200.0100.01016.80
8.3.190.0060.00419.15
8.3.180.0050.00516.96
8.3.170.0060.01218.98
8.3.160.0150.00317.23
8.3.150.0130.00618.93
8.3.140.0100.01016.85
8.3.130.0090.00018.34
8.3.120.0080.00820.50
8.3.110.0120.00320.94
8.3.100.0080.00024.06
8.3.90.0080.00026.77
8.3.80.0070.00416.50
8.3.70.0070.01016.50
8.3.60.0070.01316.61
8.3.50.0050.00716.59
8.3.40.0080.00819.14
8.3.30.0000.01419.02
8.3.20.0050.00320.53
8.3.10.0040.00421.77
8.3.00.0040.00422.30
8.2.290.0070.01120.47
8.2.280.0100.00818.27
8.2.270.0090.00916.54
8.2.260.0090.00920.95
8.2.250.0040.00418.54
8.2.240.0120.00318.91
8.2.230.0030.00622.58
8.2.220.0040.00437.54
8.2.210.0030.00526.77
8.2.200.0090.00018.42
8.2.190.0170.00716.88
8.2.180.0090.00616.50
8.2.170.0120.00922.96
8.2.160.0140.00021.32
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00419.57
8.2.110.0030.00620.31
8.2.100.0080.00318.03
8.2.90.0000.00817.63
8.2.80.0050.00317.97
8.2.70.0080.00217.77
8.2.60.0000.00818.03
8.2.50.0000.00918.07
8.2.40.0050.00319.97
8.2.30.0030.00718.18
8.2.20.0040.00418.00
8.2.10.0000.00919.32
8.2.00.0040.00418.12
8.1.330.0120.00621.91
8.1.320.0150.00418.11
8.1.310.0070.01116.88
8.1.300.0040.01118.18
8.1.290.0050.00530.84
8.1.280.0030.01725.92
8.1.270.0040.00423.99
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0040.00423.63
8.1.230.0080.00420.93
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0080.00017.47
8.1.190.0040.00417.48
8.1.180.0080.00018.10
8.1.170.0080.00418.45
8.1.160.0070.00018.89
8.1.150.0000.00718.86
8.1.140.0040.00422.09
8.1.130.0000.00817.70
8.1.120.0040.00417.64
8.1.110.0000.01017.53
8.1.100.0000.00817.70
8.1.90.0040.00717.66
8.1.80.0040.00417.57
8.1.70.0030.00517.63
8.1.60.0080.00617.60
8.1.50.0100.00617.59
8.1.40.0100.00617.60
8.1.30.0110.00617.66
8.1.20.0120.00417.72
8.1.10.0120.00517.57
8.1.00.0120.00517.59
8.0.300.0060.00318.77
8.0.290.0080.00316.75
8.0.280.0000.00818.52
8.0.270.0000.00717.33
8.0.260.0030.00318.81
8.0.250.0090.00017.18
8.0.240.0030.00617.11
8.0.230.0050.00217.02
8.0.220.0070.00016.98
8.0.210.0000.00817.13
8.0.200.0070.00017.21
8.0.190.0070.00417.03
8.0.180.0100.00517.09
8.0.170.0080.00617.04
8.0.160.0060.00716.98
8.0.150.0080.00616.95
8.0.140.0100.00417.02
8.0.130.0100.00416.36
8.0.120.0070.00716.50
8.0.110.0090.00616.53
8.0.100.0080.00716.49
8.0.90.0110.00416.53
8.0.80.0090.00716.74
8.0.70.0110.00616.56
8.0.60.0090.00716.57
8.0.50.0070.00916.61
8.0.30.0130.00516.78
8.0.20.0110.00716.82
8.0.10.0130.00716.81
8.0.00.0110.00816.82
7.4.330.0050.00016.84
7.4.320.0000.00716.52
7.4.300.0050.00416.54
7.4.290.0090.00416.56
7.4.280.0100.00216.53
7.4.270.0070.00317.13
7.4.260.0120.00316.57
7.4.250.0100.00516.09
7.4.240.0110.00416.13
7.4.230.0110.00616.12
7.4.220.0100.00516.09
7.4.210.0100.00516.37
7.4.200.0070.00816.19
7.4.190.0090.00616.26
7.4.180.0090.00716.31
7.4.160.0130.00716.39
7.4.150.0100.00716.27
7.4.140.0120.00616.42
7.4.130.0120.00616.31
7.4.120.0110.00716.33
7.4.110.0120.00816.29
7.4.100.0130.00716.40
7.4.90.0130.00816.33
7.4.80.0120.00816.63
7.4.70.0140.00716.49
7.4.60.0140.00716.54
7.4.50.0120.01016.50
7.4.40.0130.00816.48
7.4.30.0140.00816.51
7.4.20.0140.00816.51
7.4.10.0120.00916.48
7.4.00.0100.00916.30
7.3.330.0120.00615.92
7.3.320.0140.00215.51
7.3.310.0120.00515.97
7.3.300.0130.00315.92
7.3.290.0110.00716.09
7.3.280.0110.00716.20
7.3.270.0110.00816.13
7.3.260.0120.00616.31
7.3.250.0110.00816.28
7.3.240.0110.00816.35
7.3.230.0130.00816.26
7.3.220.0140.00716.26
7.3.210.0150.00716.30
7.3.200.0150.00716.46
7.3.190.0140.00816.50
7.3.180.0140.00916.47
7.3.170.0140.00816.48
7.3.160.0130.00916.45
7.3.150.0130.00816.46
7.3.140.0130.00716.49
7.3.130.0120.00816.50
7.3.120.0120.00816.21
7.3.110.0100.01016.06
7.3.100.0120.00815.92
7.3.90.0130.00715.97
7.3.80.0120.00715.85
7.3.70.0110.00815.80
7.3.60.0100.00915.80
7.3.50.0110.00815.79
7.3.40.0110.00815.80
7.3.30.0100.00815.74
7.3.20.0130.00916.25
7.3.10.0130.00816.23
7.3.00.0140.00816.25
7.2.340.0150.00916.45
7.2.330.0160.00716.51
7.2.320.0150.00816.67
7.2.310.0140.01016.68
7.2.300.0150.00916.72
7.2.290.0160.00816.69
7.2.280.0150.00816.66
7.2.270.0150.00816.64
7.2.260.0130.01116.68
7.2.250.0150.00816.50
7.2.240.0140.00816.33
7.2.230.0130.00816.20
7.2.220.0130.00916.14
7.2.210.0130.00916.11
7.2.200.0130.00816.01
7.2.190.0120.00916.02
7.2.180.0130.00716.04
7.2.170.0110.01016.03
7.2.160.0130.00816.03
7.2.150.0140.00916.45
7.2.140.0140.01016.44
7.2.130.0150.00916.50
7.2.120.0170.00816.47
7.2.110.0170.00816.46
7.2.100.0150.00916.46
7.2.90.0160.00816.49
7.2.80.0170.00716.48
7.2.70.0170.00816.46
7.2.60.0160.00816.42
7.2.50.0170.00816.45
7.2.40.0160.00916.50
7.2.30.0180.00916.51
7.2.20.0140.01016.46
7.2.10.0150.00916.46
7.2.00.0160.00916.50
7.1.330.0160.00815.85
7.1.320.0190.00915.51
7.1.310.0160.00715.46
7.1.300.0140.00815.46
7.1.290.0170.00715.46
7.1.280.0150.00715.46
7.1.270.0160.00815.41
7.1.260.0190.00715.39
7.1.250.0160.00715.35
7.1.240.0170.00815.51
7.1.230.0160.00915.51
7.1.220.0180.00815.50
7.1.210.0200.00715.49
7.1.200.0170.00815.50
7.1.190.0180.00915.49
7.1.180.0180.00715.48
7.1.170.0170.00915.46
7.1.160.0160.00815.50
7.1.150.0220.00815.47
7.1.140.0210.00815.50
7.1.130.0180.00815.53
7.1.120.0170.00915.53
7.1.110.0160.00915.55
7.1.100.0200.00815.58
7.1.90.0210.00615.55
7.1.80.0170.00815.55
7.1.70.0170.00815.54
7.1.60.0190.00815.60
7.1.50.0210.00715.58
7.1.40.0180.00715.56
7.1.30.0170.00915.59
7.1.20.0180.00715.53
7.1.10.0170.00715.53
7.1.00.0180.00715.48

preferences:
32.8 ms | 403 KiB | 5 Q