3v4l.org

run code in 300+ PHP versions simultaneously
<?php $thisWeek = new DateTime('@1408706174', new DateTimeZone('Europe/London')); // get the day of the week, Monday = 0, Sunday = 6 $dayOfWeek = ((int)$thisWeek->format('N'))-1; // subtract the day of the week to get Monday of this week $thisWeek->modify("-0 days"); // get the timestamp $monday = $thisWeek->format('U'); var_dump($monday);

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.0060.01618.43
8.3.50.0160.00522.92
8.3.40.0000.01418.81
8.3.30.0140.00019.10
8.3.20.0070.00020.34
8.3.10.0040.00423.66
8.3.00.0080.00017.71
8.2.180.0080.00818.63
8.2.170.0120.00322.96
8.2.160.0070.01120.39
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.95
8.2.110.0040.00422.25
8.2.100.0000.01117.91
8.2.90.0050.00319.38
8.2.80.0040.00417.97
8.2.70.0090.00017.75
8.2.60.0050.00518.05
8.2.50.0000.00818.07
8.2.40.0100.00317.92
8.2.30.0070.00018.00
8.2.20.0040.00417.78
8.2.10.0040.00418.02
8.2.00.0020.00517.85
8.1.280.0070.00725.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00624.04
8.1.230.0090.00319.09
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0050.00319.26
8.1.170.0000.00818.64
8.1.160.0070.00022.07
8.1.150.0100.00018.85
8.1.140.0000.00817.75
8.1.130.0000.00717.88
8.1.120.0000.00817.66
8.1.110.0060.00317.66
8.1.100.0040.00417.63
8.1.90.0020.00517.68
8.1.80.0080.00017.70
8.1.70.0040.00417.68
8.1.60.0040.00417.74
8.1.50.0040.00417.65
8.1.40.0040.00417.73
8.1.30.0040.00417.76
8.1.20.0000.00717.77
8.1.10.0050.00317.59
8.1.00.0030.00617.60
8.0.300.0000.00718.77
8.0.290.0000.01017.00
8.0.280.0000.00718.48
8.0.270.0000.00717.38
8.0.260.0000.00717.32
8.0.250.0070.00017.13
8.0.240.0000.00717.09
8.0.230.0000.00717.01
8.0.220.0040.00417.06
8.0.210.0070.00416.96
8.0.200.0030.00317.10
8.0.190.0000.00717.10
8.0.180.0040.00417.05
8.0.170.0090.00017.04
8.0.160.0000.00717.11
8.0.150.0100.00017.05
8.0.140.0040.00317.04
8.0.130.0030.00313.48
8.0.120.0070.00017.02
8.0.110.0000.00716.99
8.0.100.0070.00016.96
8.0.90.0040.00417.08
8.0.80.0090.00617.07
8.0.70.0060.00316.86
8.0.60.0000.00817.13
8.0.50.0030.00516.97
8.0.30.0070.01617.05
8.0.20.0110.00717.46
8.0.10.0040.00417.09
8.0.00.0110.00916.95
7.4.330.0000.00915.00
7.4.320.0000.00616.78
7.4.300.0000.00616.55
7.4.290.0070.00016.84
7.4.280.0000.00816.68
7.4.270.0030.00316.71
7.4.260.0070.00416.62
7.4.250.0040.00416.68
7.4.240.0040.00316.76
7.4.230.0000.00716.88
7.4.220.0070.01016.90
7.4.210.0160.00016.80
7.4.200.0080.00016.79
7.4.160.0070.01016.88
7.4.150.0080.01417.40
7.4.140.0130.00517.86
7.4.130.0090.00916.56
7.4.120.0070.01016.66
7.4.110.0080.00816.80
7.4.100.0090.00916.75
7.4.90.0130.00616.65
7.4.80.0040.01419.39
7.4.70.0130.00316.73
7.4.60.0110.00716.74
7.4.50.0030.00616.63
7.4.40.0040.01216.61
7.4.30.0060.01016.69
7.4.00.0080.01115.10
7.3.330.0080.00013.32
7.3.320.0020.00213.30
7.3.310.0000.00716.45
7.3.300.0000.00716.24
7.3.290.0080.00516.55
7.3.280.0050.01416.36
7.3.270.0100.00717.40
7.3.260.0090.00916.46
7.3.240.0100.01216.43
7.3.230.0100.00616.67
7.3.210.0100.01016.62
7.3.200.0120.00919.39
7.3.190.0110.00716.62
7.3.180.0150.00016.67
7.3.170.0090.00916.40
7.3.160.0120.00316.48
7.3.120.0110.00314.86
7.3.110.0140.00415.25
7.3.100.0000.01514.59
7.3.90.0030.00614.61
7.3.80.0030.01214.74
7.3.70.0030.00614.91
7.3.60.0090.00014.68
7.3.50.0100.00715.20
7.3.40.0090.00615.14
7.3.30.0090.00314.70
7.3.20.0110.00416.70
7.3.10.0060.00916.67
7.3.00.0040.01116.78
7.2.330.0120.00616.90
7.2.320.0100.01016.73
7.2.310.0000.01716.71
7.2.300.0060.01616.75
7.2.290.0100.00616.67
7.2.250.0110.00715.16
7.2.240.0030.01315.13
7.2.230.0030.01015.22
7.2.220.0000.01515.24
7.2.210.0070.01015.46
7.2.200.0070.00415.33
7.2.190.0030.01314.99
7.2.180.0070.01115.09
7.2.170.0060.00915.38
7.2.60.0040.00717.09
7.1.330.0040.01115.62
7.1.320.0030.00615.92
7.1.310.0030.01315.67
7.1.300.0070.00415.91
7.1.290.0000.01415.95
7.1.280.0060.00615.98
7.1.270.0070.00315.97
7.1.260.0060.01015.82
7.1.200.0080.00415.93
7.1.70.0000.00717.31
7.1.60.0110.01119.40
7.1.50.0140.01017.09
7.1.00.0030.07722.45
7.0.200.0030.00616.81
7.0.140.0170.06322.09
7.0.60.0100.03319.92
7.0.50.0000.07017.77
7.0.40.0030.04319.98
7.0.30.0300.08320.02
7.0.20.0100.04720.00
7.0.10.0070.08020.13
7.0.00.0000.06320.12
5.6.280.0070.07021.12
5.6.210.0070.07020.54
5.6.200.0070.08318.22
5.6.190.0000.05720.56
5.6.180.0200.05320.77
5.6.170.0370.07320.40
5.6.160.0030.05720.63
5.6.150.0100.03318.11
5.6.140.0030.08718.18
5.6.130.0170.05018.11
5.6.120.0030.04721.14
5.6.110.0030.09021.01
5.6.100.0100.07721.09
5.6.90.0130.07720.96
5.6.80.0100.06020.50
5.5.350.0030.04320.30
5.5.340.0030.08717.92
5.5.330.0070.07720.19
5.5.320.0300.04320.32
5.5.310.0300.07320.33
5.5.300.0000.04718.02
5.5.290.0070.04018.01
5.5.280.0070.08720.80
5.5.270.0070.05020.79
5.5.260.0070.08020.72
5.5.250.0000.06320.54
5.5.240.0100.08320.07
5.4.450.0230.04719.56
5.4.440.0230.04319.41
5.4.430.0170.05019.43
5.4.420.0270.04019.37
5.4.410.0270.04719.41
5.4.400.0100.04019.17
5.4.390.0470.04318.91
5.4.380.0430.05318.59
5.4.370.0470.05018.56
5.4.360.0500.06018.57
5.4.350.0430.06018.46
5.4.340.0530.04018.74
5.4.320.0080.03412.46
5.4.310.0070.03612.45
5.4.300.0070.04012.45
5.4.290.0050.04112.45
5.4.280.0060.03512.35
5.4.270.0030.03912.35
5.4.260.0040.03912.35
5.4.250.0050.03912.35
5.4.240.0080.03612.35
5.4.230.0070.03612.34
5.4.220.0100.03112.34
5.4.210.0050.03512.34
5.4.200.0070.04012.34
5.4.190.0040.03812.34
5.4.180.0070.03412.34
5.4.170.0040.03612.35
5.4.160.0060.03412.34
5.4.150.0050.04112.34
5.4.140.0080.03412.03
5.4.130.0070.04312.02
5.4.120.0060.03911.97
5.4.110.0090.03611.96
5.4.100.0090.03211.97
5.4.90.0060.04311.97
5.4.80.0080.03411.97
5.4.70.0090.03711.96
5.4.60.0020.03611.96
5.4.50.0050.03411.96
5.4.40.0030.03611.95
5.4.30.0060.03811.95
5.4.20.0060.03511.95
5.4.10.0050.03411.95
5.4.00.0040.03611.44
5.3.290.0070.03712.80
5.3.280.0050.03712.71
5.3.270.0060.04412.72
5.3.260.0060.03712.72
5.3.250.0060.03612.72
5.3.240.0050.03812.72
5.3.230.0050.03812.71
5.3.220.0080.03412.68
5.3.210.0050.04012.68
5.3.200.0040.03712.68
5.3.190.0090.03812.68
5.3.180.0040.03712.67
5.3.170.0060.03712.66
5.3.160.0070.03412.67
5.3.150.0070.03512.68
5.3.140.0050.03612.66
5.3.130.0060.03912.66
5.3.120.0060.04012.66
5.3.110.0070.04212.66
5.3.100.0040.04012.12
5.3.90.0050.03812.08
5.3.80.0060.04312.08
5.3.70.0080.03712.07
5.3.60.0040.03712.07
5.3.50.0030.03812.00
5.3.40.0060.04112.00
5.3.30.0040.03611.95
5.3.20.0090.03111.73
5.3.10.0080.03511.69
5.3.00.0070.03811.68
5.2.170.0060.0349.18
5.2.160.0040.0369.18
5.2.150.0070.0329.18
5.2.140.0020.0339.18
5.2.130.0040.0359.14
5.2.120.0060.0289.14
5.2.110.0060.0389.15
5.2.100.0060.0359.14
5.2.90.0050.0339.14
5.2.80.0040.0329.14
5.2.70.0050.0309.14
5.2.60.0050.0379.10
5.2.50.0030.0329.07
5.2.40.0040.0299.04
5.2.30.0050.0319.02
5.2.20.0080.0259.00
5.2.10.0040.0308.92
5.2.00.0070.0298.79
5.1.60.0020.0278.07
5.1.50.0030.0258.06
5.1.40.0040.0248.04
5.1.30.0080.0288.39
5.1.20.0040.0278.42
5.1.10.0030.0328.14
5.1.00.0060.0238.14
5.0.50.0020.0256.62
5.0.40.0060.0216.48
5.0.30.0030.0386.29
5.0.20.0030.0196.26
5.0.10.0020.0216.24
5.0.00.0020.0316.23
4.4.90.0030.0164.78
4.4.80.0040.0134.75
4.4.70.0030.0154.76
4.4.60.0040.0144.76
4.4.50.0040.0164.77
4.4.40.0040.0274.71
4.4.30.0010.0174.76
4.4.20.0020.0164.84
4.4.10.0040.0144.85
4.4.00.0020.0254.75
4.3.110.0030.0154.67
4.3.100.0020.0154.66
4.3.90.0020.0154.63
4.3.80.0010.0264.58
4.3.70.0020.0154.63
4.3.60.0010.0164.63
4.3.50.0000.0184.62
4.3.40.0030.0234.54
4.3.30.0020.0163.28
4.3.20.0020.0173.26
4.3.10.0020.0153.22
4.3.00.0000.02315.96

preferences:
49.95 ms | 401 KiB | 5 Q