3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getSundays($y, $m) { return new DatePeriod( new DateTime("first Sunday of $y-$m"), DateInterval::createFromDateString('next sunday'), new DateTime("last day of $y-$m") ); } $days=""; foreach (getSundays(2016, 04) as $Sunday) { $days[] = $Sunday->format("d"); } var_dump($days);

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.20.0150.00618.07
8.4.10.0130.00317.87
8.3.150.0110.00718.93
8.3.140.0180.00017.16
8.3.130.0000.00818.74
8.3.120.0090.00019.03
8.3.110.0080.00020.94
8.3.100.0080.00024.06
8.3.90.0170.00317.11
8.3.80.0030.00618.81
8.3.70.0140.00718.68
8.3.60.0160.00618.80
8.3.50.0150.00723.08
8.3.40.0070.00718.87
8.3.30.0080.01218.92
8.3.20.0040.00420.34
8.3.10.0080.00023.46
8.3.00.0030.00518.96
8.2.270.0120.00617.33
8.2.260.0130.00316.94
8.2.250.0080.00016.81
8.2.240.0030.00618.80
8.2.230.0030.00522.58
8.2.220.0000.00837.54
8.2.210.0170.00326.77
8.2.200.0140.00016.75
8.2.190.0190.00017.18
8.2.180.0040.01118.41
8.2.170.0100.00719.13
8.2.160.0070.01322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.01126.16
8.2.120.0080.00020.14
8.2.110.0070.00322.25
8.2.100.0060.00618.16
8.2.90.0000.00818.28
8.2.80.0050.00317.97
8.2.70.0040.00417.88
8.2.60.0030.00618.05
8.2.50.0000.00818.10
8.2.40.0050.00320.59
8.2.30.0080.00019.43
8.2.20.0050.00317.96
8.2.10.0000.00718.26
8.2.00.0000.00718.27
8.1.310.0090.00020.10
8.1.300.0080.00018.04
8.1.290.0080.00318.88
8.1.280.0110.00725.92
8.1.270.0080.00024.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00423.97
8.1.230.0120.00020.93
8.1.220.0030.00517.79
8.1.210.0060.00318.82
8.1.200.0030.00717.60
8.1.190.0000.00817.47
8.1.180.0000.00818.10
8.1.170.0050.00518.90
8.1.160.0050.00219.11
8.1.150.0050.00318.95
8.1.140.0040.00419.72
8.1.130.0030.00317.80
8.1.120.0050.00217.73
8.1.110.0040.00417.77
8.1.100.0030.00517.76
8.1.90.0030.00617.61
8.1.80.0050.00317.64
8.1.70.0040.00417.77
8.1.60.0080.00017.84
8.1.50.0050.00317.71
8.1.40.0000.00817.74
8.1.30.0060.00317.77
8.1.20.0030.00617.87
8.1.10.0030.00517.82
8.1.00.0040.00417.79
8.0.300.0000.00720.07
8.0.290.0050.00217.00
8.0.280.0070.00018.55
8.0.270.0040.00417.08
8.0.260.0030.00517.32
8.0.250.0000.00717.20
8.0.240.0080.00017.17
8.0.230.0070.00017.30
8.0.220.0030.00317.17
8.0.210.0070.00017.17
8.0.200.0040.00417.31
8.0.190.0040.00417.35
8.0.180.0060.00317.33
8.0.170.0040.00417.14
8.0.160.0000.00917.26
8.0.150.0060.00317.14
8.0.140.0000.00717.14
8.0.130.0030.00313.67
8.0.120.0080.00017.23
8.0.110.0040.00417.27
8.0.100.0040.00417.24
8.0.90.0000.00717.05
8.0.80.0070.01017.20
8.0.70.0000.00817.10
8.0.60.0000.00717.20
8.0.50.0040.00417.19
8.0.30.0090.01017.22
8.0.20.0110.00717.41
8.0.10.0030.00517.39
8.0.00.0120.00617.29
7.4.330.0000.00715.08
7.4.320.0030.00316.80
7.4.300.0000.00616.79
7.4.290.0030.00316.77
7.4.280.0000.00816.75
7.4.270.0000.00716.74
7.4.260.0050.00216.67
7.4.250.0030.00316.79
7.4.240.0040.00416.73
7.4.230.0030.00316.92
7.4.220.0030.01316.75
7.4.210.0050.00916.77
7.4.200.0000.00716.61
7.4.160.0130.00316.61
7.4.150.0150.00617.40
7.4.140.0090.01217.86
7.4.130.0030.01416.78
7.4.120.0090.00916.84
7.4.110.0100.00716.59
7.4.100.0100.01017.05
7.4.90.0070.01016.67
7.4.80.0100.00719.39
7.4.70.0070.01316.83
7.4.60.0070.01016.78
7.4.50.0090.00316.73
7.4.40.0060.01416.78
7.4.30.0070.01016.63
7.4.00.0030.00615.34
7.3.330.0070.00013.63
7.3.320.0030.00313.43
7.3.310.0030.00616.48
7.3.300.0000.00716.61
7.3.290.0000.00716.54
7.3.280.0080.01016.56
7.3.270.0070.01117.40
7.3.260.0130.00616.75
7.3.250.0130.00616.82
7.3.240.0140.00316.94
7.3.230.0160.00316.59
7.3.210.0100.00716.91
7.3.200.0090.00616.90
7.3.190.0090.00816.80
7.3.180.0080.00816.82
7.3.170.0050.01116.87
7.3.160.0160.00016.77
7.2.330.0060.01216.88
7.2.320.0070.01217.02
7.2.310.0140.00316.83
7.2.300.0070.01017.03
7.2.290.0180.03216.89
7.2.60.0090.00617.35
7.2.00.0060.00619.73
7.1.200.0270.01215.93
7.1.100.0060.00617.95
7.1.70.0040.00417.31
7.1.60.0140.01119.90
7.1.50.0090.01217.17
7.1.00.0100.07022.40
7.0.200.0330.00315.21
7.0.80.0130.07719.88
7.0.70.0070.08019.85
7.0.60.0070.05020.09
7.0.50.0600.07720.29
7.0.40.0030.05020.08
7.0.30.0100.09320.19
7.0.20.0070.08720.04
7.0.10.0130.08020.10
7.0.00.0070.04020.10
5.6.280.0130.06321.12
5.6.230.0070.08020.72
5.6.220.0070.05320.67
5.6.210.0130.07320.56
5.6.200.0170.07321.04
5.6.190.0070.04721.09
5.6.180.0030.04721.11
5.6.170.0100.08021.05
5.6.160.0070.04021.12
5.6.150.0030.04321.01
5.6.140.0100.06721.05
5.6.130.0070.09021.02
5.6.120.0100.07320.90
5.6.110.0100.04321.05
5.6.100.0000.06020.94
5.6.90.0030.04320.94
5.6.80.0100.05720.41
5.6.70.0000.04320.40
5.6.60.0030.04320.42
5.6.50.0000.04720.41
5.6.40.0100.03720.42
5.6.30.0030.04020.47
5.6.20.0100.03320.43
5.6.10.0100.03720.37
5.6.00.0030.05320.43
5.5.370.0030.05320.45
5.5.360.0170.06720.44
5.5.350.0070.08320.45
5.5.340.0100.07020.73
5.5.330.0070.08320.78
5.5.320.0030.04720.83
5.5.310.0300.07020.80
5.5.300.0070.07020.88
5.5.290.0030.08320.77
5.5.280.0100.04020.83
5.5.270.0130.03720.87
5.5.260.0130.03720.88
5.5.250.0000.08720.61
5.5.240.0070.05020.31
5.5.230.0070.03720.20
5.5.220.0030.04019.99
5.5.210.0000.04320.29
5.5.200.0000.04720.28
5.5.190.0100.03320.19
5.5.180.0070.03720.18
5.5.160.0030.04020.23
5.5.150.0030.04020.23
5.5.140.0100.03320.11
5.5.130.0100.06020.19
5.5.120.0100.04720.21
5.5.110.0000.05319.97
5.5.100.0070.06020.12
5.5.90.0030.03320.17
5.5.80.0100.04720.06
5.5.70.0030.04019.94
5.5.60.0030.06020.05
5.5.50.0030.03720.14
5.5.40.0100.03320.03
5.5.30.0100.05020.13
5.5.20.0070.04720.10
5.5.10.0030.04020.12
5.5.00.0000.04320.07

preferences:
29.77 ms | 403 KiB | 5 Q