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(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.60.0070.00718.30
8.3.50.0100.00722.90
8.3.40.0040.01118.69
8.3.30.0100.00618.92
8.3.20.0050.00320.24
8.3.10.0070.00023.62
8.3.00.0040.00417.63
8.2.180.0110.00718.55
8.2.170.0070.00722.96
8.2.160.0070.01320.43
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0000.00826.16
8.2.120.0050.00220.91
8.2.110.0000.01122.04
8.2.100.0070.00417.90
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0080.00418.02
8.2.30.0040.00418.19
8.2.20.0000.00717.75
8.2.10.0040.00418.11
8.2.00.0040.00417.78
8.1.280.0040.01125.92
8.1.270.0090.00023.91
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00323.90
8.1.230.0030.00919.15
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.48
8.1.190.0080.00017.38
8.1.180.0090.00019.26
8.1.170.0060.00318.67
8.1.160.0000.00722.02
8.1.150.0000.01018.98
8.1.140.0040.00417.64
8.1.130.0070.00017.93
8.1.120.0070.00017.61
8.1.110.0040.00417.64
8.1.100.0000.00717.61
8.1.90.0000.00717.69
8.1.80.0040.00417.69
8.1.70.0030.00617.68
8.1.60.0000.00917.82
8.1.50.0000.00817.67
8.1.40.0000.00817.77
8.1.30.0050.00317.82
8.1.20.0030.00617.67
8.1.10.0040.00417.68
8.1.00.0030.00617.56
8.0.300.0000.00718.77
8.0.290.0060.00316.86
8.0.280.0080.00018.52
8.0.270.0000.00817.24
8.0.260.0030.00317.25
8.0.250.0030.00317.16
8.0.240.0080.00017.13
8.0.230.0030.00317.02
8.0.220.0050.00217.08
8.0.210.0000.00916.98
8.0.200.0000.00617.04
8.0.190.0000.00717.09
8.0.180.0000.00717.14
8.0.170.0030.00517.11
8.0.160.0070.00016.97
8.0.150.0000.01217.09
8.0.140.0000.00717.10
8.0.130.0090.00013.40
8.0.120.0030.00516.96
8.0.110.0000.00717.03
8.0.100.0000.00716.93
8.0.90.0050.00316.93
8.0.80.0090.01317.04
8.0.70.0030.00717.16
8.0.60.0030.00516.91
8.0.50.0040.00417.13
8.0.30.0110.01217.29
8.0.20.0100.00917.43
8.0.10.0040.00417.32
8.0.00.0160.00516.96
7.4.330.0030.00315.00
7.4.320.0060.00016.85
7.4.300.0000.00616.80
7.4.290.0050.00216.69
7.4.280.0000.00716.78
7.4.270.0030.00416.63
7.4.260.0080.00316.80
7.4.250.0040.00416.65
7.4.240.0020.00516.76
7.4.230.0000.00716.59
7.4.220.0110.00716.83
7.4.210.0000.01516.70
7.4.200.0070.00016.55
7.4.160.0090.00616.65
7.4.150.0040.01417.40
7.4.140.0110.00717.86
7.4.130.0100.01316.79
7.4.120.0090.01216.55
7.4.110.0130.01316.89
7.4.100.0030.01416.76
7.4.90.0160.00316.55
7.4.80.0130.00619.39
7.4.70.0080.00816.88
7.4.60.0040.01316.78
7.4.50.0030.00616.63
7.4.40.0080.00816.67
7.4.30.0090.00916.88
7.4.00.0040.01414.94
7.3.330.0030.00313.22
7.3.320.0030.00313.22
7.3.310.0000.00616.49
7.3.300.0000.00716.39
7.3.290.0120.00616.37
7.3.280.0090.00816.41
7.3.270.0040.01417.40
7.3.260.0040.01616.59
7.3.240.0090.00916.46
7.3.230.0070.01116.42
7.3.210.0110.00916.70
7.3.200.0110.00719.39
7.3.190.0070.01516.63
7.3.180.0120.00316.59
7.3.170.0060.00916.63
7.3.160.0120.00916.71
7.2.330.0140.00316.89
7.2.320.0070.01416.78
7.2.310.0080.01116.88
7.2.300.0130.01016.69
7.2.290.0110.00416.52
7.2.60.0060.00617.21
7.1.200.0060.00615.74
7.1.70.0050.00317.38
7.1.60.0140.01119.40
7.1.50.0100.01017.14
7.1.00.0030.07322.44
7.0.200.0030.00316.77
7.0.140.0000.08022.10
7.0.60.0100.08020.01
7.0.50.0070.08317.83
7.0.40.0170.07720.06
7.0.30.0530.05720.28
7.0.20.0230.05320.17
7.0.10.0170.07720.02
7.0.00.0130.07320.18
5.6.280.0100.06720.86
5.6.210.0130.07320.62
5.6.200.0070.05018.09
5.6.190.0070.08320.33
5.6.180.0270.04020.54
5.6.170.0270.07720.41
5.6.160.0070.08320.54
5.6.150.0030.07018.18
5.6.140.0070.08318.09
5.6.130.0030.07718.10
5.6.120.0030.07720.97
5.6.110.0070.07320.95
5.6.100.0100.06721.02
5.6.90.0270.07021.03
5.6.80.0000.09020.52
5.5.350.0100.08020.32
5.5.340.0030.06017.91
5.5.330.0070.08720.43
5.5.320.0330.04020.28
5.5.310.0300.08020.20
5.5.300.0070.05018.00
5.5.290.0130.07717.95
5.5.280.0130.04720.89
5.5.270.0030.09020.87
5.5.260.0030.06020.96
5.5.250.0170.03020.69
5.5.240.0200.07020.12
5.4.450.0170.05019.23
5.4.440.0670.03019.46
5.4.430.0270.03719.48
5.4.420.0300.05019.54
5.4.410.0200.03719.44
5.4.400.0230.04319.09
5.4.390.0200.05319.24
5.4.380.0970.07318.68
5.4.370.1270.04318.69
5.4.360.1000.06318.77
5.4.350.1530.06318.77
5.4.340.0800.07318.68
5.4.320.0070.03912.46
5.4.310.0060.03912.45
5.4.300.0080.03312.46
5.4.290.0040.04012.45
5.4.280.0050.03612.35
5.4.270.0060.03612.35
5.4.260.0050.04712.35
5.4.250.0040.04012.35
5.4.240.0050.03612.35
5.4.230.0060.03712.34
5.4.220.0070.03612.34
5.4.210.0040.03612.34
5.4.200.0060.03712.34
5.4.190.0040.03812.34
5.4.180.0060.03612.34
5.4.170.0110.03112.35
5.4.160.0070.03512.35
5.4.150.0100.04212.34
5.4.140.0090.04712.03
5.4.130.0050.03612.01
5.4.120.0080.04411.97
5.4.110.0040.03711.97
5.4.100.0050.03611.96
5.4.90.0050.03711.97
5.4.80.0090.03211.97
5.4.70.0040.03611.96
5.4.60.0040.03611.96
5.4.50.0040.03611.96
5.4.40.0060.03911.95
5.4.30.0070.03311.95
5.4.20.0080.03211.95
5.4.10.0050.03411.95
5.4.00.0070.04011.44
5.3.290.0030.04112.80
5.3.280.0060.05312.71
5.3.270.0070.04712.72
5.3.260.0080.04012.71
5.3.250.0080.04312.72
5.3.240.0050.03812.71
5.3.230.0040.03912.71
5.3.220.0070.04412.68
5.3.210.0060.03812.68
5.3.200.0050.03612.68
5.3.190.0040.03912.68
5.3.180.0080.04012.67
5.3.170.0090.04112.67
5.3.160.0040.03712.68
5.3.150.0070.03612.68
5.3.140.0070.03412.66
5.3.130.0090.04012.66
5.3.120.0100.05712.66
5.3.110.0100.04412.66
5.3.100.0080.03512.12
5.3.90.0070.03512.08
5.3.80.0070.04012.07
5.3.70.0050.04312.07
5.3.60.0050.04212.06
5.3.50.0060.04112.00
5.3.40.0060.04212.00
5.3.30.0040.03611.95
5.3.20.0080.04311.72
5.3.10.0060.04111.69
5.3.00.0050.03711.68
5.2.170.0040.0309.18
5.2.160.0050.0289.18
5.2.150.0040.0319.18
5.2.140.0060.0289.18
5.2.130.0060.0279.14
5.2.120.0050.0279.14
5.2.110.0060.0279.14
5.2.100.0080.0339.14
5.2.90.0040.0299.14
5.2.80.0030.0319.14
5.2.70.0050.0309.14
5.2.60.0050.0299.09
5.2.50.0040.0309.06
5.2.40.0040.0289.04
5.2.30.0070.0279.01
5.2.20.0050.0289.00
5.2.10.0050.0278.92
5.2.00.0060.0278.78
5.1.60.0040.0258.06
5.1.50.0010.0288.06
5.1.40.0030.0268.04
5.1.30.0050.0308.39
5.1.20.0050.0258.42
5.1.10.0050.0258.14
5.1.00.0030.0278.14
5.0.50.0070.0176.62
5.0.40.0040.0186.48
5.0.30.0040.0306.29
5.0.20.0040.0186.26
5.0.10.0040.0196.24
5.0.00.0040.0306.23
4.4.90.0030.0144.77
4.4.80.0070.0194.76
4.4.70.0010.0234.75
4.4.60.0010.0174.76
4.4.50.0030.0144.77
4.4.40.0010.0264.71
4.4.30.0010.0174.76
4.4.20.0020.0164.84
4.4.10.0040.0134.85
4.4.00.0030.0244.76
4.3.110.0030.0154.67
4.3.100.0030.0174.66
4.3.90.0010.0174.64
4.3.80.0020.0254.58
4.3.70.0030.0144.63
4.3.60.0050.0204.63
4.3.50.0030.0154.63
4.3.40.0030.0304.54
4.3.30.0030.0153.28
4.3.20.0010.0173.26
4.3.10.0010.0223.22
4.3.00.0000.01315.96

preferences:
49.75 ms | 401 KiB | 5 Q