3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strtDate = '2015-05-01'; $endDate = '2015-08-31'; $begin = new DateTime($strtDate); $end = new DateTime(date("Y-m-d", strtotime("+1 day", strtotime($endDate)))); // $weekNo = floor($begin->diff($end)->days / 7); $startDateWeekCnt = floor( date('d',strtotime($begin)) / 7) ; // echo $startDateWeekCnt ."\n"; $endDateWeekCnt = floor( date('d',strtotime($end)) / 7) ; //echo $endDateWeekCnt. "\n"; $datediff = strtotime(date('Y-m',strtotime($endDate))."-01") - strtotime(date('Y-m',strtotime($strtDate))."-01"); $totalnoOfWeek = round(floor($datediff/(60*60*24)) / 7) + $endDateWeekCnt - $startDateWeekCnt ; echo $totalnoOfWeek ."\n";

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.0090.01216.73
8.3.50.0140.00621.11
8.3.40.0030.01718.90
8.3.30.0100.00319.02
8.3.20.0040.00420.34
8.3.10.0040.00423.52
8.3.00.0050.00323.52
8.2.180.0120.00916.88
8.2.170.0070.00722.96
8.2.160.0140.00019.46
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0000.00917.60
8.2.110.0030.00620.60
8.2.100.0040.00817.75
8.2.90.0050.00319.36
8.2.80.0000.00817.97
8.2.70.0030.00817.63
8.2.60.0030.00718.05
8.2.50.0050.00518.07
8.2.40.0040.00421.25
8.2.30.0020.00518.13
8.2.20.0060.00317.94
8.2.10.0030.00518.07
8.2.00.0040.00418.29
8.1.280.0140.00725.92
8.1.270.0000.00820.36
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00419.38
8.1.230.0070.00320.85
8.1.220.0030.00517.77
8.1.210.0040.00418.77
8.1.200.0060.00317.60
8.1.190.0040.00417.60
8.1.180.0030.00618.10
8.1.170.0040.00418.84
8.1.160.0000.00722.04
8.1.150.0070.00018.98
8.1.140.0040.00417.71
8.1.130.0000.00717.85
8.1.120.0040.00417.68
8.1.110.0070.00017.64
8.1.100.0080.00017.59
8.1.90.0030.00317.68
8.1.80.0030.00517.57
8.1.70.0000.00717.67
8.1.60.0030.00617.58
8.1.50.0030.00517.69
8.1.40.0030.00617.74
8.1.30.0050.00317.67
8.1.20.0060.00317.86
8.1.10.0040.00417.83
8.1.00.0040.00417.73
8.0.300.0040.00418.77
8.0.290.0020.00517.00
8.0.280.0000.00718.41
8.0.270.0040.00417.23
8.0.260.0030.00317.28
8.0.250.0000.00717.17
8.0.240.0000.00717.33
8.0.230.0030.00517.16
8.0.220.0030.00317.15
8.0.210.0070.00017.05
8.0.200.0060.00017.24
8.0.190.0050.00517.23
8.0.180.0000.00917.18
8.0.170.0000.00817.18
8.0.160.0040.00417.05
8.0.150.0040.00417.09
8.0.140.0030.00517.02
8.0.130.0000.00613.55
8.0.120.0080.00017.18
8.0.110.0040.00417.10
8.0.100.0000.00817.11
8.0.90.0040.00417.23
8.0.80.0090.01317.09
8.0.70.0030.00517.15
8.0.60.0050.00317.04
8.0.50.0040.00417.14
8.0.30.0120.00517.25
8.0.20.0160.00517.48
8.0.10.0050.00317.30
8.0.00.0070.01316.98
7.4.330.0050.00015.08
7.4.320.0070.00016.79
7.4.300.0070.00016.76
7.4.290.0070.00016.81
7.4.280.0050.00316.61
7.4.270.0040.00416.86
7.4.260.0050.00316.79
7.4.250.0040.00416.66
7.4.240.0020.00616.77
7.4.230.0070.00016.75
7.4.220.0060.01816.82
7.4.210.0130.00616.71
7.4.200.0000.00716.93
7.4.160.0120.00416.86
7.4.150.0120.00817.40
7.4.140.0140.00517.86
7.4.130.0050.01316.94
7.4.120.0090.01016.87
7.4.110.0120.00616.62
7.4.100.0060.01316.71
7.4.90.0140.00316.81
7.4.80.0070.01019.39
7.4.70.0070.01016.87
7.4.60.0180.00016.55
7.4.50.0030.00316.67
7.4.40.0150.00616.79
7.4.30.0090.00917.00
7.4.00.0020.01615.21
7.3.330.0060.00013.57
7.3.320.0050.00013.38
7.3.310.0040.00416.74
7.3.300.0000.00716.55
7.3.290.0050.00816.64
7.3.280.0120.00716.66
7.3.270.0160.00017.40
7.3.260.0140.00416.81
7.3.250.0080.00916.66
7.3.240.0170.00716.71
7.3.230.0060.01216.76
7.3.210.0100.00716.68
7.3.200.0030.01416.85
7.3.190.0030.01316.82
7.3.180.0070.01016.78
7.3.170.0140.00316.75
7.3.160.0110.00616.72
7.3.120.0040.01515.21
7.3.110.0030.01015.35
7.3.100.0070.01015.22
7.3.90.0040.00715.21
7.3.80.0140.00015.18
7.3.70.0030.01015.23
7.3.60.0040.00815.18
7.3.50.0040.00715.09
7.3.40.0070.00715.14
7.3.30.0140.00014.90
7.3.20.0090.00316.99
7.3.10.0070.00717.17
7.3.00.0080.00417.10
7.2.330.0070.01016.86
7.2.320.0110.01116.68
7.2.310.0070.01017.03
7.2.300.0070.01416.89
7.2.290.0090.01217.16
7.2.250.0040.00815.23
7.2.240.0090.00915.38
7.2.230.0040.01115.52
7.2.220.0000.01215.19
7.2.210.0000.01615.37
7.2.200.0080.00615.32
7.2.190.0120.00315.05
7.2.180.0070.01015.27
7.2.170.0060.00915.32
7.2.00.0000.01519.75
7.1.330.0080.00815.98
7.1.320.0070.00316.11
7.1.310.0030.00715.98
7.1.300.0040.00416.02
7.1.290.0040.01115.80
7.1.280.0090.00615.93
7.1.270.0100.00315.95
7.1.260.0000.01216.05
7.1.200.0090.00616.09
7.1.100.0000.01118.34
7.1.70.0000.00817.42
7.1.60.0110.01419.42
7.1.50.0100.01317.18
7.1.00.0030.07722.52
7.0.200.0380.00315.21
7.0.100.0100.09020.06
7.0.90.0070.05719.94
7.0.80.0170.07719.98
7.0.70.0130.07319.87
7.0.60.0070.09319.95
7.0.50.0200.07020.19
7.0.40.0070.07720.15
7.0.30.0100.08320.00
7.0.20.0070.05020.08
7.0.10.0070.07720.02
7.0.00.0100.07720.12
5.6.280.0100.06721.11
5.6.250.0170.05720.61
5.6.240.0070.08720.65
5.6.230.0100.07720.69
5.6.220.0130.07320.66
5.6.210.0000.05720.53
5.6.200.0070.08321.15
5.6.190.0030.05720.95
5.6.180.0100.09021.06
5.6.170.0070.07020.96
5.6.160.0070.08021.01
5.6.150.0100.04321.08
5.6.140.0200.07021.06
5.6.130.0070.07020.98
5.6.120.0100.08021.04
5.6.110.0070.08020.96
5.6.100.0030.05720.91
5.6.90.0070.06020.97
5.6.80.0200.05320.32
5.6.70.0100.05720.37
5.6.60.0070.08320.54
5.6.50.0100.08020.56
5.6.40.0070.07320.43
5.6.30.0070.04020.40
5.6.20.0070.08020.38
5.6.10.0070.08020.53
5.6.00.0170.06020.36
5.5.380.0100.04320.43
5.5.370.0030.09020.57
5.5.360.0130.09020.45
5.5.350.0100.08320.38
5.5.340.0000.04720.89
5.5.330.0100.08320.93
5.5.320.0170.04320.91
5.5.310.0030.08320.82
5.5.300.0100.04320.92
5.5.290.0070.07720.78
5.5.280.0070.05020.78
5.5.270.0170.07720.86
5.5.260.0130.08720.86
5.5.250.0030.08720.65
5.5.240.0230.06320.15
5.5.230.0030.05720.29
5.5.220.0130.04320.26
5.5.210.0030.08020.16
5.5.200.0070.07720.25
5.5.190.0030.04320.22
5.5.180.0030.04020.00
5.5.160.0100.07320.27
5.5.150.0100.07720.27
5.5.140.0100.07320.24
5.5.130.0070.07320.22
5.5.120.0070.07320.15
5.5.110.0030.08320.14
5.5.100.0100.07020.06
5.5.90.0070.08020.11
5.5.80.0070.06020.06
5.5.70.0130.04020.08
5.5.60.0030.05020.14
5.5.50.0270.05320.11
5.5.40.0100.04720.00
5.5.30.0130.04720.08
5.5.20.0100.07320.03
5.5.10.0070.07720.06
5.5.00.0100.07720.09
5.4.450.0070.08019.38
5.4.440.0030.08719.43
5.4.430.0130.07719.34
5.4.420.0170.06019.50
5.4.410.0130.07719.34
5.4.400.0130.06319.16
5.4.390.0000.08719.12
5.4.380.0130.06319.10
5.4.370.0030.06018.84
5.4.360.0100.04718.96
5.4.350.0030.07719.10
5.4.340.0070.08019.16
5.4.320.0100.08019.20
5.4.310.0070.08018.98
5.4.300.0070.04318.84
5.4.290.0000.08319.02
5.4.280.0100.06319.00
5.4.270.0030.05318.87
5.4.260.0170.06018.84
5.4.250.0070.04719.09
5.4.240.0070.04318.97
5.4.230.0130.07018.95
5.4.220.0070.08018.95
5.4.210.0030.04719.08
5.4.200.0100.08019.07
5.4.190.0030.07319.05
5.4.180.0100.07019.28
5.4.170.0100.07019.09
5.4.160.0070.04318.94
5.4.150.0100.06319.27
5.4.140.0030.06316.40
5.4.130.0070.03316.32
5.4.120.0070.03316.39
5.4.110.0070.04016.52
5.4.100.0030.04016.50
5.4.90.0030.03716.38
5.4.80.0070.03316.31
5.4.70.0030.03716.44
5.4.60.0070.04016.42
5.4.50.0000.04016.42
5.4.40.0200.01716.36
5.4.30.0030.04316.34
5.4.20.0030.03316.22
5.4.10.0030.04016.39
5.4.00.0100.02315.80
5.3.290.0100.07014.59
5.3.280.0000.08314.66
5.3.270.0130.07014.59
5.3.260.0070.07714.53
5.3.250.0100.07014.55
5.3.240.0130.03014.59
5.3.230.0100.05014.55
5.3.220.0130.03314.50
5.3.210.0030.04314.55
5.3.200.0000.04014.50
5.3.190.0000.04014.53
5.3.180.0000.04014.53
5.3.170.0030.04014.50
5.3.160.0030.04014.49
5.3.150.0000.04014.51
5.3.140.0030.05714.53
5.3.130.0000.04014.48
5.3.120.0100.03714.54
5.3.110.0030.04314.48
5.3.100.0070.06014.11
5.3.90.0000.06013.90
5.3.80.0030.07713.86
5.3.70.0030.06314.07
5.3.60.0000.04014.00
5.3.50.0000.03713.93
5.3.40.0100.07013.93
5.3.30.0000.05013.88
5.3.20.0030.07013.70
5.3.10.0070.04713.66
5.3.00.0030.04013.63
5.2.170.0030.06011.27
5.2.160.0030.02711.23
5.2.150.0030.02711.23
5.2.140.0070.02311.33
5.2.130.0000.03711.29
5.2.120.0000.02711.37
5.2.110.0100.04311.23
5.2.100.0030.02711.19
5.2.90.0030.02711.20
5.2.80.0000.03311.15
5.2.70.0030.03011.15
5.2.60.0070.02311.21
5.2.50.0070.02311.20
5.2.40.0030.02711.08
5.2.30.0000.03011.16
5.2.20.0070.02310.97
5.2.10.0030.02711.12
5.2.00.0030.05310.96
5.1.60.0030.0239.84
5.1.50.0030.02310.08
5.1.40.0030.0239.94
5.1.30.0030.02310.39
5.1.20.0030.02310.38
5.1.10.0030.02010.07
5.1.00.0070.02310.09
5.0.50.0030.0238.59
5.0.40.0030.0208.50
5.0.30.0000.0338.30
5.0.20.0030.0178.24
5.0.10.0000.0238.24
5.0.00.0030.0278.15
4.4.90.0030.0137.08
4.4.80.0030.0137.08
4.4.70.0000.0177.08
4.4.60.0000.0177.08
4.4.50.0000.0307.08
4.4.40.0000.0237.08
4.4.30.0000.0177.08
4.4.20.0070.0237.08
4.4.10.0000.0137.08
4.4.00.0000.0277.08
4.3.110.0000.0177.08
4.3.100.0000.0177.08
4.3.90.0000.0207.08
4.3.80.0000.0237.08
4.3.70.0030.0137.08
4.3.60.0030.0137.08
4.3.50.0030.0107.08
4.3.40.0070.0177.08
4.3.30.0030.0207.08
4.3.20.0000.0177.08
4.3.10.0000.0207.08
4.3.00.0000.0137.08

preferences:
65.13 ms | 401 KiB | 5 Q