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; $thisWeek->setTime(-1,0,0); // 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.40.0140.00718.79
8.3.30.0140.00718.93
8.3.20.0070.00020.34
8.3.10.0040.00423.60
8.3.00.0000.00819.25
8.2.170.0070.00722.96
8.2.160.0110.00320.53
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00720.90
8.2.110.0090.00020.99
8.2.100.0060.00617.91
8.2.90.0080.00018.15
8.2.80.0060.00317.97
8.2.70.0000.00817.59
8.2.60.0100.00017.93
8.2.50.0080.00018.07
8.2.40.0070.00318.09
8.2.30.0080.00018.01
8.2.20.0000.00717.77
8.2.10.0000.00818.09
8.2.00.0040.00417.96
8.1.270.0050.00323.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00722.61
8.1.230.0100.00021.04
8.1.220.0030.00517.76
8.1.210.0040.00418.97
8.1.200.0060.00317.38
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0030.00618.61
8.1.160.0080.00021.96
8.1.150.0110.00018.86
8.1.140.0070.00017.56
8.1.130.0000.00717.96
8.1.120.0070.00017.68
8.1.110.0040.00417.50
8.1.100.0050.00317.64
8.1.90.0070.00017.73
8.1.80.0030.00517.72
8.1.70.0040.00417.72
8.1.60.0000.00817.76
8.1.50.0080.00017.68
8.1.40.0040.00417.64
8.1.30.0040.00417.82
8.1.20.0060.00317.79
8.1.10.0040.00417.69
8.1.00.0040.00417.66
8.0.300.0000.00719.98
8.0.290.0000.00816.88
8.0.280.0000.00718.57
8.0.270.0040.00417.38
8.0.260.0030.00317.34
8.0.250.0000.00717.11
8.0.240.0040.00417.14
8.0.230.0020.00517.13
8.0.220.0030.00317.12
8.0.210.0000.01017.06
8.0.200.0000.00617.13
8.0.190.0070.00017.12
8.0.180.0040.00417.09
8.0.170.0000.00817.15
8.0.160.0000.00817.01
8.0.150.0070.00016.96
8.0.140.0000.00716.95
8.0.130.0000.00513.52
8.0.120.0070.00016.98
8.0.110.0040.00417.01
8.0.100.0050.00316.99
8.0.90.0060.00317.04
8.0.80.0120.00317.02
8.0.70.0030.00616.96
8.0.60.0040.00417.10
8.0.50.0000.00716.91
8.0.30.0150.00717.46
8.0.20.0110.00817.41
8.0.10.0040.00417.26
8.0.00.0110.00717.03
7.4.330.0000.00615.28
7.4.320.0000.00616.73
7.4.300.0000.00616.79
7.4.290.0000.00716.72
7.4.280.0070.00016.68
7.4.270.0030.00516.70
7.4.260.0070.00316.61
7.4.250.0050.00316.65
7.4.240.0030.00316.70
7.4.230.0000.00716.78
7.4.220.0140.00316.75
7.4.210.0070.01016.89
7.4.200.0040.00416.90
7.4.160.0120.00316.49
7.4.150.0040.01917.40
7.4.140.0150.00717.86
7.4.130.0090.01116.66
7.4.120.0140.00516.54
7.4.110.0200.00716.71
7.4.100.0120.00816.57
7.4.90.0070.01016.58
7.4.80.0060.01219.39
7.4.70.0100.00716.63
7.4.60.0070.01116.62
7.4.50.0060.00316.43
7.4.40.0040.01216.56
7.4.30.0070.01016.64
7.4.00.0070.01015.18
7.3.330.0030.00413.16
7.3.320.0000.00513.30
7.3.310.0000.00816.20
7.3.300.0060.00016.28
7.3.290.0100.00316.43
7.3.280.0100.00616.44
7.3.270.0100.01017.40
7.3.260.0130.00616.41
7.3.250.0130.00516.63
7.3.240.0210.00016.64
7.3.230.0120.00616.39
7.3.210.0090.00916.86
7.3.200.0070.01019.39
7.3.190.0070.01316.63
7.3.180.0030.01416.48
7.3.170.0120.00516.73
7.3.160.0040.01316.73
7.3.120.0030.01315.20
7.3.110.0140.00715.18
7.3.100.0130.00015.24
7.3.90.0060.00615.00
7.3.80.0100.00315.03
7.3.70.0110.00414.93
7.3.60.0030.00915.14
7.3.50.0070.00714.95
7.3.40.0070.00414.77
7.3.30.0100.00315.04
7.3.20.0000.01016.61
7.3.10.0060.00916.82
7.3.00.0030.01216.78
7.2.330.0090.00917.02
7.2.320.0090.01216.95
7.2.310.0120.00316.88
7.2.300.0070.01016.80
7.2.290.0120.00417.02
7.2.250.0070.01015.25
7.2.240.0030.01715.32
7.2.230.0030.01515.11
7.2.220.0030.01015.07
7.2.210.0040.00815.14
7.2.200.0070.00715.25
7.2.190.0030.01115.25
7.2.180.0030.01215.16
7.2.170.0000.01415.16
7.2.130.0040.00917.27
7.2.120.0040.00816.82
7.2.110.0040.00817.02
7.2.100.0040.01216.94
7.2.90.0040.01216.84
7.2.80.0080.00416.96
7.2.70.0060.00616.68
7.2.60.0100.00716.84
7.2.50.0070.00717.06
7.2.40.0040.01117.15
7.2.30.0070.00716.80
7.2.20.0000.01316.85
7.2.10.0000.01416.98
7.2.00.0130.00016.84
7.1.330.0060.00615.98
7.1.320.0070.00715.88
7.1.310.0030.01015.92
7.1.300.0030.00715.64
7.1.290.0060.00616.08
7.1.280.0090.00615.88
7.1.270.0000.01415.84
7.1.260.0030.00815.96
7.1.250.0040.00715.89
7.1.240.0090.00615.98
7.1.230.0060.00616.13
7.1.220.0080.00316.05
7.1.210.0030.00915.76
7.1.200.0040.00815.92
7.1.190.0040.00816.02
7.1.180.0000.01416.02
7.1.170.0070.00315.94
7.1.160.0090.00615.79
7.1.150.0030.00615.68
7.1.140.0000.01216.04
7.1.130.0070.00415.91
7.1.120.0030.01016.05
7.1.110.0070.00415.75
7.1.100.0030.00615.99
7.1.90.0000.00916.03
7.1.80.0000.01415.91
7.1.70.0050.00516.60
7.1.60.0050.01117.50
7.1.50.0030.01516.36
7.1.40.0060.00916.08
7.1.30.0100.00715.86
7.1.20.0030.00915.80
7.1.10.0030.00715.74
7.1.00.0030.04319.19
7.0.330.0000.01015.57
7.0.320.0030.00715.56
7.0.310.0000.01015.47
7.0.300.0000.01115.50
7.0.290.0070.00715.39
7.0.280.0080.00415.46
7.0.270.0030.01015.36
7.0.260.0040.00415.71
7.0.250.0040.00715.40
7.0.240.0030.00915.51
7.0.230.0040.00815.34
7.0.220.0030.00915.81
7.0.210.0100.00315.45
7.0.200.0050.00316.15
7.0.190.0060.00615.37
7.0.180.0030.01415.55
7.0.170.0070.00415.54
7.0.160.0070.00615.41
7.0.150.0030.01015.52
7.0.140.0060.04018.82
7.0.130.0030.00915.62
7.0.120.0060.00915.75
7.0.110.0000.01415.70
7.0.100.0060.00915.53
7.0.90.0110.00015.62
7.0.80.0080.00415.70
7.0.70.0040.00715.42
7.0.60.0090.04217.61
7.0.50.0070.02216.77
7.0.40.0100.03416.83
7.0.30.0250.02716.89
7.0.20.0190.03716.99
7.0.10.0080.04416.86
7.0.00.0110.04216.84
5.6.380.0070.00314.57
5.6.370.0060.00614.73
5.6.360.0030.00914.27
5.6.350.0080.00414.52
5.6.340.0000.01114.34
5.6.330.0110.00414.31
5.6.320.0060.00814.41
5.6.310.0030.01014.26
5.6.300.0090.00614.66
5.6.290.0040.00814.45
5.6.280.0050.04017.57
5.6.270.0090.00614.41
5.6.260.0000.01114.34
5.6.250.0060.00614.18
5.6.240.0030.01214.57
5.6.230.0060.00614.27
5.6.220.0030.01014.52
5.6.210.0060.04517.58
5.6.200.0050.04516.28
5.6.190.0060.04917.51
5.6.180.0170.02217.34
5.6.170.0140.03917.37
5.6.160.0070.02917.47
5.6.150.0000.03716.29
5.6.140.0060.03316.30
5.6.130.0050.03216.29
5.6.120.0050.03317.77
5.6.110.0020.05017.76
5.6.100.0160.03917.72
5.6.90.0060.02817.55
5.6.80.0090.03617.40
5.6.70.0030.00814.55
5.6.60.0000.01214.33
5.6.50.0000.00914.35
5.6.40.0070.00714.43
5.6.30.0040.00814.25
5.6.20.0040.00814.42
5.6.10.0000.00814.21
5.6.00.0000.00714.55
5.5.380.0070.00311.11
5.5.370.0000.00811.09
5.5.360.0030.00311.16
5.5.350.0130.03215.75
5.5.340.0050.02714.59
5.5.330.0050.04515.64
5.5.320.0230.02615.68
5.5.310.0160.03715.71
5.5.300.0020.03114.63
5.5.290.0020.04614.62
5.5.280.0070.03815.88
5.5.270.0110.02815.91
5.5.260.0060.02815.95
5.5.250.0080.03615.84
5.5.240.0130.03815.68
5.5.230.0030.01011.17
5.5.220.0000.00811.08
5.5.210.0060.00611.07
5.5.200.0000.01111.17
5.5.190.0060.00610.84
5.5.180.0030.00911.08
5.5.170.0050.00210.96
5.5.160.0000.01211.14
5.5.150.0070.00310.93
5.5.140.0100.00011.20
5.5.130.0110.00011.14
5.5.120.0040.00411.33
5.5.110.0040.00411.11
5.5.100.0000.00710.90
5.5.90.0040.00410.93
5.5.80.0080.00311.19
5.5.70.0040.00410.98
5.5.60.0030.00311.19
5.5.50.0000.00611.16
5.5.40.0030.00310.95
5.5.30.0000.00811.01
5.5.20.0000.00811.22
5.5.10.0000.00811.18
5.5.00.0000.00710.97
5.4.450.0130.02915.37
5.4.440.0300.03215.05
5.4.430.0110.02515.08
5.4.420.0100.02715.30
5.4.410.0110.01815.10
5.4.400.0110.01515.16
5.4.390.0160.02014.92
5.4.380.0170.03114.88
5.4.370.0200.03214.85
5.4.360.0230.03014.89
5.4.350.0130.03514.88
5.4.340.0250.02014.74
5.4.330.0060.00311.00
5.4.320.0060.01911.70
5.4.310.0040.02111.65
5.4.300.0020.02311.74
5.4.290.0020.02411.73
5.4.280.0060.01811.71
5.4.270.0060.01911.54
5.4.260.0060.02111.57
5.4.250.0040.02111.68
5.4.240.0070.01911.57
5.4.230.0050.02111.69
5.4.220.0040.02211.63
5.4.210.0060.02111.50
5.4.200.0060.02011.63
5.4.190.0050.02211.65
5.4.180.0040.02311.49
5.4.170.0050.01911.66
5.4.160.0030.02611.53
5.4.150.0030.02211.50
5.4.140.0090.02111.57
5.4.130.0050.01911.48
5.4.120.0060.01711.35
5.4.110.0050.02111.43
5.4.100.0040.02211.39
5.4.90.0050.01911.38
5.4.80.0060.02411.56
5.4.70.0050.01911.38
5.4.60.0080.01811.54
5.4.50.0020.02311.34
5.4.40.0060.02011.54
5.4.30.0060.01911.45
5.4.20.0020.02311.49
5.4.10.0060.01811.50
5.4.00.0040.02211.29
5.3.290.0040.02311.74
5.3.280.0050.02111.69
5.3.270.0060.02111.74
5.3.260.0060.02211.73
5.3.250.0030.02111.73
5.3.240.0020.02211.76
5.3.230.0070.02111.71
5.3.220.0070.01811.46
5.3.210.0030.02311.61
5.3.200.0050.02111.53
5.3.190.0060.02311.63
5.3.180.0060.02211.66
5.3.170.0040.02011.69
5.3.160.0080.02211.68
5.3.150.0040.02211.59
5.3.140.0040.02511.63
5.3.130.0040.02011.64
5.3.120.0070.01911.51
5.3.110.0060.02311.60
5.3.100.0020.02211.38
5.3.90.0050.02211.33
5.3.80.0090.01511.28
5.3.70.0070.02111.27
5.3.60.0030.02411.35
5.3.50.0050.02011.27
5.3.40.0060.02011.29
5.3.30.0040.02211.32
5.3.20.0060.01711.15
5.3.10.0040.02411.04
5.3.00.0070.02011.05
5.2.170.0030.0189.56
5.2.160.0060.0179.56
5.2.150.0030.0189.56
5.2.140.0060.0199.56
5.2.130.0030.0179.54
5.2.120.0020.0199.54
5.2.110.0040.0179.54
5.2.100.0050.0169.54
5.2.90.0020.0229.54
5.2.80.0030.0219.54
5.2.70.0070.0189.54
5.2.60.0030.0209.52
5.2.50.0020.0199.50
5.2.40.0040.0189.49
5.2.30.0040.0169.48
5.2.20.0020.0189.47
5.2.10.0020.0179.43
5.2.00.0050.0159.36
5.1.60.0020.0179.01
5.1.50.0050.0139.01
5.1.40.0020.0148.99
5.1.30.0050.0139.17
5.1.20.0070.0139.18
5.1.10.0030.0169.04
5.1.00.0060.0149.04
5.0.50.0010.0138.28
5.0.40.0020.0128.21
5.0.30.0040.0158.12
5.0.20.0020.0118.10
5.0.10.0050.0108.09
5.0.00.0030.0198.09
4.4.90.0010.0117.36
4.4.80.0050.0087.35
4.4.70.0020.0107.35
4.4.60.0030.0097.35
4.4.50.0030.0107.36
4.4.40.0020.0167.32
4.4.30.0030.0097.35
4.4.20.0030.0097.39
4.4.10.0020.0097.40
4.4.00.0010.0157.35
4.3.110.0030.0107.31
4.3.100.0020.0107.30
4.3.90.0030.0137.29
4.3.80.0010.0167.26
4.3.70.0010.0107.29
4.3.60.0010.0117.29
4.3.50.0030.0097.29
4.3.40.0010.0157.24
4.3.30.0040.0096.61
4.3.20.0010.0116.60
4.3.10.0010.0116.58
4.3.00.0110.01012.96

preferences:
40.52 ms | 400 KiB | 5 Q