3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = new \DateTime(); $startDate->setDate(2014, 01, 30); $startDate->setTime(0, 0, 0); var_dump($startDate); $nextMonth = clone $startDate; $nextMonth->modify('+ 14 days'); $nextMonth->modify('last day of the month'); var_dump($nextMonth); $startDate->add(new DateInterval(sprintf('P%dD', $startDate->format('t')))); $startDate->sub(new DateInterval('P1D')); $startDate->setTime(23, 59, 59); while ($startDate >= $nextMonth) { $startDate->sub(new DateInterval('P1D')); } var_dump($startDate); $newDate = new \DateTime(); $newDate->setDate(2014, 02, 27); $newDate->setTime(23, 59, 59); var_dump($newDate->getTimestamp() == $startDate->getTimestamp());

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.0110.00418.68
8.3.50.0090.00921.17
8.3.40.0140.00718.99
8.3.30.0070.00719.21
8.3.20.0000.00820.15
8.3.10.0080.00020.79
8.3.00.0040.00419.63
8.2.180.0100.01316.88
8.2.170.0190.00019.26
8.2.160.0090.00622.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0060.00326.16
8.2.120.0040.00422.36
8.2.110.0130.00922.27
8.2.100.0140.00018.29
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0090.00017.88
8.2.60.0030.00718.05
8.2.50.0030.00618.07
8.2.40.0000.00818.04
8.2.30.0000.00818.21
8.2.20.0040.00417.83
8.2.10.0000.00818.08
8.2.00.0040.00417.95
8.1.280.0160.00325.92
8.1.270.0060.00324.00
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.88
8.1.230.0110.00019.21
8.1.220.0000.00817.89
8.1.210.0080.00018.77
8.1.200.0070.00317.48
8.1.190.0060.00317.46
8.1.180.0050.00318.10
8.1.170.0000.00918.84
8.1.160.0000.00722.01
8.1.150.0040.00418.89
8.1.140.0040.00417.64
8.1.130.0030.00317.88
8.1.120.0070.00017.73
8.1.110.0040.00417.62
8.1.100.0040.00417.73
8.1.90.0040.00417.77
8.1.80.0020.00517.63
8.1.70.0000.00717.73
8.1.60.0000.00817.80
8.1.50.0030.00517.79
8.1.40.0040.00417.71
8.1.30.0060.00317.84
8.1.20.0050.00317.82
8.1.10.0040.00417.72
8.1.00.0040.00417.73
8.0.300.0000.00718.77
8.0.290.0060.00317.00
8.0.280.0000.00818.71
8.0.270.0030.00317.32
8.0.260.0080.00017.32
8.0.250.0070.00017.29
8.0.240.0030.00317.32
8.0.230.0070.00017.23
8.0.220.0070.00017.25
8.0.210.0080.00017.15
8.0.200.0030.00517.30
8.0.190.0050.00317.30
8.0.180.0000.00717.31
8.0.170.0050.00317.23
8.0.160.0040.00417.31
8.0.150.0050.00317.13
8.0.140.0050.00317.21
8.0.130.0000.00913.60
8.0.120.0050.00317.21
8.0.110.0030.00517.19
8.0.100.0080.00017.09
8.0.90.0030.00617.11
8.0.80.0100.01017.18
8.0.70.0030.00517.18
8.0.60.0040.00417.04
8.0.50.0040.00417.18
8.0.30.0100.00917.36
8.0.20.0130.01117.43
8.0.10.0000.00817.31
8.0.00.0080.01117.03
7.4.330.0050.00015.09
7.4.320.0030.00316.70
7.4.300.0030.00316.80
7.4.290.0030.00316.73
7.4.280.0000.00916.82
7.4.270.0030.00316.82
7.4.260.0070.00016.60
7.4.250.0000.00816.59
7.4.240.0040.00416.81
7.4.230.0030.00316.55
7.4.220.0040.01416.75
7.4.210.0030.01216.69
7.4.200.0070.00016.82
7.4.160.0080.00816.91
7.4.150.0040.01417.40
7.4.140.0100.01017.86
7.4.130.0100.01016.84
7.4.120.0070.01316.75
7.4.110.0080.01016.81
7.4.100.0120.00916.50
7.4.90.0190.00316.78
7.4.80.0000.01819.39
7.4.70.0140.00716.89
7.4.60.0100.00716.98
7.4.50.0060.00316.52
7.4.40.0130.00416.87
7.4.30.0090.00916.96
7.4.10.0130.00715.26
7.4.00.0100.00714.96
7.3.330.0000.00613.46
7.3.320.0020.00213.50
7.3.310.0040.00416.61
7.3.300.0040.00416.45
7.3.290.0040.01716.51
7.3.280.0080.01016.53
7.3.270.0090.00917.40
7.3.260.0170.00316.79
7.3.250.0140.00816.52
7.3.240.0060.01216.62
7.3.230.0040.01216.69
7.3.210.0160.00316.70
7.3.200.0120.00919.39
7.3.190.0060.01216.69
7.3.180.0150.00316.77
7.3.170.0070.01516.51
7.3.160.0090.01116.56
7.3.130.0110.00714.88
7.3.120.0030.01315.13
7.3.110.0000.01515.22
7.3.100.0100.00315.03
7.3.90.0070.00314.90
7.3.80.0080.00814.80
7.3.70.0000.01515.03
7.3.60.0050.00915.18
7.3.50.0030.01014.97
7.3.40.0070.01315.03
7.3.30.0070.01015.07
7.3.20.0040.01116.94
7.3.10.0030.00916.85
7.3.00.0030.00917.00
7.2.330.0180.00616.75
7.2.320.0090.00916.94
7.2.310.0160.00617.03
7.2.300.0090.01216.72
7.2.290.0100.01316.86
7.2.260.0040.01415.23
7.2.250.0110.00715.42
7.2.240.0060.00915.20
7.2.230.0030.01315.16
7.2.220.0040.01514.81
7.2.210.0100.00615.11
7.2.200.0100.00715.23
7.2.190.0000.01814.95
7.2.180.0060.00615.31
7.2.170.0030.01315.19
7.2.160.0090.01215.35
7.2.150.0040.01817.18
7.2.140.0060.00916.83
7.2.130.0100.00616.74
7.2.120.0090.00617.08
7.2.110.0030.01217.16
7.2.100.0030.01017.08
7.2.90.0070.01117.14
7.2.80.0120.00017.16
7.2.70.0120.00317.10
7.2.60.0110.00617.17
7.2.50.0070.00716.88
7.2.40.0070.01017.14
7.2.30.0070.00717.22
7.2.20.0060.01217.10
7.2.10.0060.01317.22
7.2.00.0040.00916.96
7.1.330.0140.00016.07
7.1.320.0090.00616.16
7.1.310.0070.00415.95
7.1.300.0030.01016.08
7.1.290.0060.00615.96
7.1.280.0080.00915.77
7.1.270.0040.01215.89
7.1.260.0070.00715.84
7.1.250.0040.00816.20
7.1.240.0140.00415.88
7.1.230.0040.00915.76
7.1.220.0040.00715.91
7.1.210.0090.00616.13
7.1.200.0000.01515.96
7.1.190.0030.00916.21
7.1.180.0060.01015.93
7.1.170.0130.00015.98
7.1.160.0030.01315.97
7.1.150.0030.01316.16
7.1.140.0090.00616.28
7.1.130.0070.01016.26
7.1.120.0030.01416.14
7.1.110.0060.00616.27
7.1.100.0070.01015.85
7.1.90.0030.01316.14
7.1.80.0060.00316.11
7.1.70.0040.00716.77
7.1.60.0090.01117.75
7.1.50.0040.00916.66
7.1.40.0120.00615.91
7.1.30.0060.01016.09
7.1.20.0030.00715.64
7.1.10.0060.00916.04
7.1.00.0060.04019.24
7.0.330.0060.01015.59
7.0.320.0060.00615.55
7.0.310.0040.00715.40
7.0.300.0080.00815.48
7.0.290.0060.00915.32
7.0.280.0000.01315.48
7.0.270.0080.00615.29
7.0.260.0060.00615.71
7.0.250.0070.00715.71
7.0.240.0070.01015.43
7.0.230.0030.01015.69
7.0.220.0000.01115.59
7.0.210.0130.00015.70
7.0.200.0080.00416.35
7.0.190.0000.01415.46
7.0.180.0120.00615.80
7.0.170.0030.00615.29
7.0.160.0030.01015.70
7.0.150.0130.00015.63
7.0.140.0090.03518.87
7.0.130.0040.00415.55
7.0.120.0030.00615.45
7.0.110.0040.01215.55
7.0.100.0100.00615.69
7.0.90.0000.01215.70
7.0.80.0030.01015.35
7.0.70.2420.02717.83
7.0.60.0020.04017.88
7.0.50.0030.02316.67
7.0.40.0070.03216.85
7.0.30.0230.04416.91
7.0.20.0190.02316.88
7.0.10.0130.02316.93
7.0.00.0030.04716.79
5.6.400.0060.00614.57
5.6.390.0060.00314.50
5.6.380.0070.01014.62
5.6.370.0100.00714.55
5.6.360.0000.01614.32
5.6.350.0100.00314.70
5.6.340.0000.01514.18
5.6.330.0080.00814.75
5.6.320.0040.01214.69
5.6.310.0070.00714.23
5.6.300.0040.00714.65
5.6.290.0070.00714.80
5.6.280.0040.04017.78
5.6.270.0000.01414.60
5.6.260.0040.00914.24
5.6.250.0070.01014.32
5.6.240.0060.00614.43
5.6.230.0030.00914.79
5.6.220.0070.00714.38
5.6.210.0020.05217.53
5.6.200.0060.04516.22
5.6.190.0070.02217.43
5.6.180.0100.04317.29
5.6.170.0270.03617.54
5.6.160.0080.03717.37
5.6.150.0040.04116.26
5.6.140.0050.03216.28
5.6.130.0130.04116.36
5.6.120.0040.04617.77
5.6.110.0120.04317.70
5.6.100.0070.04017.76
5.6.90.0110.04117.69
5.6.80.0050.04317.33
5.6.70.0110.03617.38
5.6.60.0060.00914.41
5.6.50.0060.00914.53
5.6.40.0030.01314.42
5.6.30.0110.00014.73
5.6.20.0120.00314.25
5.6.10.0070.00714.38
5.6.00.0060.00314.46
5.5.380.0000.00814.61
5.5.370.0040.00414.66
5.5.360.0050.00514.75
5.5.350.0040.02617.51
5.5.340.0040.02516.27
5.5.330.0090.03917.43
5.5.320.0060.04917.27
5.5.310.0150.02217.41
5.5.300.0040.02516.22
5.5.290.0100.04216.06
5.5.280.0060.02717.56
5.5.270.0090.02317.70
5.5.260.0050.03117.61
5.5.250.0070.04017.61
5.5.240.0040.02517.28
5.5.230.0060.00614.53
5.5.220.0030.00914.53
5.5.210.0060.01014.55
5.5.200.0040.01214.11
5.5.190.0030.00914.65
5.5.180.0060.00814.44
5.5.170.0000.01413.99
5.5.160.0030.01214.52
5.5.150.0060.00914.58
5.5.140.0110.00414.62
5.5.130.0090.00314.41
5.5.120.0030.01314.77
5.5.110.0050.00514.61
5.5.100.0070.00714.23
5.5.90.0130.00014.56
5.5.80.0070.00714.36
5.5.70.0090.00614.34
5.5.60.0000.01614.27
5.5.50.0030.00914.31
5.5.40.0140.00014.43
5.5.30.0100.00714.26
5.5.20.0100.00314.23
5.5.10.0030.01014.43
5.5.00.0030.00614.41
5.4.450.0230.03715.27
5.4.440.0130.02515.22
5.4.430.0320.02815.37
5.4.420.0330.00515.34
5.4.410.0340.00415.35
5.4.400.0330.00515.14
5.4.390.0360.00215.08
5.4.380.0350.00215.07
5.4.370.0330.00315.03
5.4.360.0330.00015.06
5.4.350.0370.00215.15
5.4.340.0380.00115.05
5.4.330.0090.00311.12
5.4.320.0050.02211.72
5.4.310.0040.02111.80
5.4.300.0050.02711.78
5.4.290.0050.02411.67
5.4.280.0040.02111.83
5.4.270.0030.02311.86
5.4.260.0070.02011.86
5.4.250.0060.01911.66
5.4.240.0080.02411.76
5.4.230.0070.02111.68
5.4.220.0070.01711.75
5.4.210.0020.02611.61
5.4.200.0020.02211.81
5.4.190.0060.02311.70
5.4.180.0040.02311.75
5.4.170.0070.01711.58
5.4.160.0070.02511.70
5.4.150.0040.02511.70
5.4.140.0030.02411.68
5.4.130.0030.02111.68
5.4.120.0030.02311.48
5.4.110.0050.02011.55
5.4.100.0050.02211.36
5.4.90.0090.02911.35
5.4.80.0070.02511.63
5.4.70.0100.02611.61
5.4.60.0070.02011.57
5.4.50.0060.02311.62
5.4.40.0080.02311.52
5.4.30.0040.03311.42
5.4.20.0050.02311.56
5.4.10.0050.02411.57
5.4.00.0050.02411.21
5.3.290.0080.03912.80
5.3.280.0080.04012.71
5.3.270.0070.03912.73
5.3.260.0090.03712.71
5.3.250.0050.04012.71
5.3.240.0040.03912.72
5.3.230.0090.03512.71
5.3.220.0040.03912.68
5.3.210.0080.03612.68
5.3.200.0060.04512.68
5.3.190.0080.03912.68
5.3.180.0060.03712.67
5.3.170.0080.04912.67
5.3.160.0110.03912.68
5.3.150.0070.04512.68
5.3.140.0080.03412.66
5.3.130.0080.04512.66
5.3.120.0060.03812.66
5.3.110.0070.04612.66
5.3.100.0060.03812.12
5.3.90.0070.04412.09
5.3.80.0090.03912.07
5.3.70.0070.04112.08
5.3.60.0060.04312.07
5.3.50.0100.03812.01
5.3.40.0050.03912.01
5.3.30.0030.04111.97
5.3.20.0070.04011.75
5.3.10.0070.05111.71
5.3.00.0070.03511.71
5.2.170.0030.0329.20
5.2.160.0070.0439.20
5.2.150.0050.0309.20
5.2.140.0060.0299.20
5.2.130.0040.0299.16
5.2.120.0070.0269.16
5.2.110.0060.0349.16
5.2.100.0070.0289.16
5.2.90.0040.0319.16
5.2.80.0050.0349.16
5.2.70.0050.0379.16
5.2.60.0060.0329.10
5.2.50.0050.0369.07
5.2.40.0040.0389.05
5.2.30.0040.0349.03
5.2.20.0040.0299.03
5.2.10.0090.0318.95
5.2.00.0070.0428.81
5.1.60.0060.0288.09
5.1.50.0060.0288.08
5.1.40.0080.0268.06
5.1.30.0050.0258.42
5.1.20.0070.0328.43
5.1.10.0050.0278.16
5.1.00.0050.0318.16
5.0.50.0040.0196.64
5.0.40.0060.0236.50
5.0.30.0040.0396.31
5.0.20.0030.0186.29
5.0.10.0020.0206.26
5.0.00.0030.0306.25
4.4.90.0010.0244.78
4.4.80.0040.0144.76
4.4.70.0020.0204.75
4.4.60.0030.0154.75
4.4.50.0020.0164.77
4.4.40.0040.0244.71
4.4.30.0000.0214.75
4.4.20.0030.0154.84
4.4.10.0030.0154.85
4.4.00.0010.0264.76
4.3.110.0030.0164.67
4.3.100.0050.0124.67
4.3.90.0050.0174.64
4.3.80.0020.0294.58
4.3.70.0060.0164.63
4.3.60.0030.0144.63
4.3.50.0010.0174.63
4.3.40.0050.0214.54
4.3.30.0010.0173.29
4.3.20.0030.0253.26
4.3.10.0040.0193.22
4.3.00.0000.01313.59

preferences:
47.44 ms | 401 KiB | 5 Q