3v4l.org

run code in 300+ PHP versions simultaneously
<?php $thisWeek = new DateTime('@1408706174'); // get the day of the week, Monday = 0, Sunday = 6 $dayOfWeek = ((int)$thisWeek->format('N'))-1; $thisWeek->setTime(0,1,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.70.0100.00716.63
8.3.60.0090.00616.75
8.3.50.0120.00722.91
8.3.40.0070.00718.79
8.3.30.0100.00719.10
8.3.20.0040.00420.18
8.3.10.0070.00023.66
8.3.00.0080.00017.75
8.2.180.0060.00916.50
8.2.170.0090.00622.96
8.2.160.0140.00020.61
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0000.00720.87
8.2.110.0000.00922.25
8.2.100.0090.00319.64
8.2.90.0040.00419.35
8.2.80.0000.00817.97
8.2.70.0060.00317.73
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0020.00517.97
8.2.30.0040.00718.01
8.2.20.0050.00317.88
8.2.10.0000.00818.13
8.2.00.0020.00517.75
8.1.280.0140.00025.92
8.1.270.0060.00324.01
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00624.01
8.1.230.0110.00019.35
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0040.00417.38
8.1.180.0050.00318.10
8.1.170.0090.00018.71
8.1.160.0070.00022.01
8.1.150.0030.00619.01
8.1.140.0040.00417.64
8.1.130.0030.00317.98
8.1.120.0040.00417.70
8.1.110.0040.00417.64
8.1.100.0000.00817.69
8.1.90.0000.00717.73
8.1.80.0040.00417.70
8.1.70.0040.00417.59
8.1.60.0030.00517.75
8.1.50.0040.00417.59
8.1.40.0000.00817.60
8.1.30.0030.00517.73
8.1.20.0070.00017.75
8.1.10.0000.00717.77
8.1.00.0050.00217.67
8.0.300.0070.00018.77
8.0.290.0000.00717.00
8.0.280.0030.00318.43
8.0.270.0050.00317.25
8.0.260.0020.00517.32
8.0.250.0070.00017.19
8.0.240.0050.00217.20
8.0.230.0070.00017.17
8.0.220.0040.00417.04
8.0.210.0050.00517.05
8.0.200.0060.00017.14
8.0.190.0050.00217.05
8.0.180.0000.00717.11
8.0.170.0080.00017.14
8.0.160.0070.00017.04
8.0.150.0000.00817.04
8.0.140.0000.00816.93
8.0.130.0000.00513.43
8.0.120.0000.00816.94
8.0.110.0040.00416.98
8.0.100.0030.00317.12
8.0.90.0040.00416.92
8.0.80.0090.01017.04
8.0.70.0030.00517.04
8.0.60.0060.00317.05
8.0.50.0040.00417.14
8.0.30.0130.00816.98
8.0.20.0160.00717.40
8.0.10.0060.00317.15
8.0.00.0070.01316.91
7.4.330.0030.00315.00
7.4.320.0000.00616.73
7.4.300.0000.00616.73
7.4.290.0000.00716.77
7.4.280.0040.00416.77
7.4.270.0070.00016.69
7.4.260.0030.00616.61
7.4.250.0030.00316.74
7.4.240.0000.00816.71
7.4.230.0050.00216.87
7.4.220.0130.01316.70
7.4.210.0090.00616.67
7.4.200.0030.00316.57
7.4.160.0120.00316.69
7.4.150.0100.01617.40
7.4.140.0170.00817.86
7.4.130.0110.00816.76
7.4.120.0080.01016.73
7.4.110.0140.00416.73
7.4.100.0100.01016.69
7.4.90.0060.01616.78
7.4.80.0120.00619.39
7.4.70.0130.00916.86
7.4.60.0090.00916.71
7.4.50.0040.00416.40
7.4.40.0130.00416.46
7.4.30.0070.00716.85
7.4.00.0060.01115.22
7.3.330.0070.00013.21
7.3.320.0000.00613.29
7.3.310.0000.00616.32
7.3.300.0020.00416.44
7.3.290.0000.01416.38
7.3.280.0070.01016.38
7.3.270.0140.00417.40
7.3.260.0070.01016.43
7.3.250.0110.00616.55
7.3.240.0060.01216.40
7.3.230.0140.00316.50
7.3.210.0110.00716.62
7.3.200.0150.00319.39
7.3.190.0110.00716.64
7.3.180.0120.00416.51
7.3.170.0030.01316.89
7.3.160.0000.01616.77
7.3.120.0060.01314.77
7.3.110.0070.01014.56
7.3.100.0070.00715.15
7.3.90.0070.00714.89
7.3.80.0040.00415.02
7.3.70.0060.00314.66
7.3.60.0030.01215.00
7.3.50.0030.01014.95
7.3.40.0060.00614.95
7.3.30.0120.00314.95
7.3.20.0120.00616.88
7.3.10.0040.00817.07
7.3.00.0040.01116.91
7.2.330.0060.01516.95
7.2.320.0100.01416.50
7.2.310.0030.01316.57
7.2.300.0080.01416.77
7.2.290.0100.00616.93
7.2.250.0110.00715.07
7.2.240.0070.01314.91
7.2.230.0030.00915.03
7.2.220.0060.00615.29
7.2.210.0060.00914.83
7.2.200.0100.00015.07
7.2.190.0090.00615.22
7.2.180.0000.01015.04
7.2.170.0040.01115.21
7.2.60.0000.01316.96
7.1.330.0000.01515.81
7.1.320.0040.00815.96
7.1.310.0000.00915.97
7.1.300.0000.01215.75
7.1.290.0030.00615.63
7.1.280.0060.00615.96
7.1.270.0110.00016.12
7.1.260.0040.00715.77
7.1.200.0070.00315.88
7.1.70.0040.00417.46
7.1.60.0120.00919.40
7.1.50.0090.01517.11
7.1.00.0000.09022.33
7.0.200.0000.00716.78
7.0.140.0070.07022.21
7.0.60.0170.06719.92
7.0.50.0030.04317.83
7.0.40.0070.04020.09
7.0.30.0330.07720.16
7.0.20.0230.07320.20
7.0.10.0100.08320.09
7.0.00.0070.09020.19
5.6.280.0030.07020.86
5.6.210.0000.04320.60
5.6.200.0070.04018.22
5.6.190.0070.04020.39
5.6.180.0230.08020.77
5.6.170.0270.06720.71
5.6.160.0000.05320.37
5.6.150.0130.07718.18
5.6.140.0030.08718.11
5.6.130.0200.03018.09
5.6.120.0200.07321.01
5.6.110.0030.04720.85
5.6.100.0100.06021.14
5.6.90.0130.07721.07
5.6.80.0200.06320.50
5.5.350.0000.08320.35
5.5.340.0130.05318.02
5.5.330.0100.07020.07
5.5.320.0230.08020.51
5.5.310.0170.04320.20
5.5.300.0000.08717.97
5.5.290.0070.07717.92
5.5.280.0070.08720.65
5.5.270.0170.07320.96
5.5.260.0100.05720.84
5.5.250.0070.07020.64
5.5.240.0070.07720.07
5.4.450.0330.05319.59
5.4.440.0100.06019.58
5.4.430.0800.06019.60
5.4.420.0170.04719.15
5.4.410.0130.05319.35
5.4.400.0130.05019.02
5.4.390.0170.07018.92
5.4.380.0300.05718.73
5.4.370.0400.05318.70
5.4.360.0400.04718.72
5.4.350.0300.06018.77
5.4.340.0430.04318.50
5.4.320.0070.04212.46
5.4.310.0130.04412.45
5.4.300.0040.04012.45
5.4.290.0080.03912.45
5.4.280.0100.03612.35
5.4.270.0050.03812.35
5.4.260.0070.03912.35
5.4.250.0080.04812.35
5.4.240.0080.03912.35
5.4.230.0020.04112.34
5.4.220.0030.05012.34
5.4.210.0060.03612.34
5.4.200.0060.03812.34
5.4.190.0070.03612.34
5.4.180.0070.03712.34
5.4.170.0050.03712.35
5.4.160.0040.03812.34
5.4.150.0070.03812.34
5.4.140.0100.03712.03
5.4.130.0040.03712.01
5.4.120.0020.04011.97
5.4.110.0140.03311.96
5.4.100.0120.03711.97
5.4.90.0110.03211.96
5.4.80.0140.04411.96
5.4.70.0100.03611.96
5.4.60.0110.03811.96
5.4.50.0070.04011.96
5.4.40.0070.03311.95
5.4.30.0090.03111.95
5.4.20.0060.03511.95
5.4.10.0050.03411.95
5.4.00.0070.03411.44
5.3.290.0120.04912.80
5.3.280.0070.04512.71
5.3.270.0100.03612.73
5.3.260.0050.04112.72
5.3.250.0060.03812.72
5.3.240.0070.03612.72
5.3.230.0050.03812.71
5.3.220.0030.03912.68
5.3.210.0050.03912.68
5.3.200.0050.03712.68
5.3.190.0060.03812.68
5.3.180.0060.03812.67
5.3.170.0060.03812.67
5.3.160.0080.03512.67
5.3.150.0090.03412.68
5.3.140.0070.03612.66
5.3.130.0060.04712.66
5.3.120.0040.04112.66
5.3.110.0080.03712.66
5.3.100.0050.03812.12
5.3.90.0070.03512.09
5.3.80.0090.03312.07
5.3.70.0070.03512.07
5.3.60.0060.03612.06
5.3.50.0080.03412.00
5.3.40.0060.03712.00
5.3.30.0090.03111.95
5.3.20.0080.03311.72
5.3.10.0060.03711.69
5.3.00.0040.03711.68
5.2.170.0040.0319.18
5.2.160.0060.0369.18
5.2.150.0020.0339.18
5.2.140.0020.0339.18
5.2.130.0050.0289.14
5.2.120.0080.0259.14
5.2.110.0040.0299.14
5.2.100.0040.0299.14
5.2.90.0040.0299.14
5.2.80.0050.0329.14
5.2.70.0070.0329.14
5.2.60.0040.0319.09
5.2.50.0060.0289.06
5.2.40.0060.0279.04
5.2.30.0050.0299.01
5.2.20.0070.0269.00
5.2.10.0070.0268.93
5.2.00.0040.0298.78
5.1.60.0030.0248.07
5.1.50.0040.0248.06
5.1.40.0040.0238.05
5.1.30.0040.0268.40
5.1.20.0050.0258.42
5.1.10.0000.0298.14
5.1.00.0040.0258.14
5.0.50.0040.0196.62
5.0.40.0030.0196.48
5.0.30.0020.0346.29
5.0.20.0020.0216.27
5.0.10.0030.0206.24
5.0.00.0030.0316.23
4.4.90.0010.0174.78
4.4.80.0010.0174.75
4.4.70.0030.0154.75
4.4.60.0040.0164.76
4.4.50.0040.0144.77
4.4.40.0030.0264.71
4.4.30.0030.0154.76
4.4.20.0020.0164.84
4.4.10.0020.0164.85
4.4.00.0030.0244.75
4.3.110.0040.0144.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0010.0254.59
4.3.70.0020.0154.63
4.3.60.0020.0144.63
4.3.50.0040.0144.63
4.3.40.0040.0224.54
4.3.30.0000.0173.28
4.3.20.0010.0163.26
4.3.10.0020.0153.22
4.3.00.0030.0237.20

preferences:
58.8 ms | 401 KiB | 5 Q