3v4l.org

run code in 300+ PHP versions simultaneously
<?php $thisWeek = new DateTime('today'); // 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("-$dayOfWeek 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.0110.00616.63
8.3.50.0240.00522.84
8.3.40.0160.00318.96
8.3.30.0070.00719.04
8.3.20.0050.00320.34
8.3.10.0030.00523.48
8.3.00.0050.00317.63
8.2.180.0090.00916.88
8.2.170.0100.01022.96
8.2.160.0110.00420.53
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00721.22
8.2.110.0060.00322.21
8.2.100.0000.01017.91
8.2.90.0000.00719.34
8.2.80.0040.00417.97
8.2.70.0000.00917.75
8.2.60.0000.00917.93
8.2.50.0100.00518.07
8.2.40.0080.00318.03
8.2.30.0070.00418.22
8.2.20.0040.00417.93
8.2.10.0040.00418.07
8.2.00.0040.00417.93
8.1.280.0140.00025.92
8.1.270.0040.00424.02
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0040.00719.21
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.63
8.1.190.0060.00317.25
8.1.180.0040.00418.10
8.1.170.0040.00418.62
8.1.160.0000.00722.02
8.1.150.0000.00718.95
8.1.140.0030.00617.61
8.1.130.0000.00717.84
8.1.120.0000.00717.56
8.1.110.0080.00017.63
8.1.100.0070.00017.62
8.1.90.0000.00717.64
8.1.80.0040.00417.70
8.1.70.0040.00417.66
8.1.60.0060.00317.79
8.1.50.0050.00217.74
8.1.40.0000.00717.68
8.1.30.0030.00617.81
8.1.20.0020.00517.80
8.1.10.0000.00817.75
8.1.00.0020.00517.79
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0030.00318.50
8.0.270.0000.00717.46
8.0.260.0040.00417.41
8.0.250.0030.00317.14
8.0.240.0070.00017.21
8.0.230.0030.00317.21
8.0.220.0020.00517.18
8.0.210.0090.00017.20
8.0.200.0000.00617.11
8.0.190.0090.00017.13
8.0.180.0040.00417.08
8.0.170.0000.00817.07
8.0.160.0000.00917.27
8.0.150.0030.00617.13
8.0.140.0000.00917.01
8.0.130.0070.00013.46
8.0.120.0000.00817.10
8.0.110.0040.00417.04
8.0.100.0000.00717.23
8.0.90.0000.00717.20
8.0.80.0080.00817.16
8.0.70.0040.00417.18
8.0.60.0030.00517.18
8.0.50.0000.00817.16
8.0.30.0120.00717.29
8.0.20.0130.00617.40
8.0.10.0040.00417.29
8.0.00.0070.01017.11
7.4.330.0060.00015.00
7.4.320.0030.00316.81
7.4.300.0070.00016.72
7.4.290.0000.00716.80
7.4.280.0040.00416.69
7.4.270.0030.00316.77
7.4.260.0000.00916.82
7.4.250.0040.00416.66
7.4.240.0020.00516.79
7.4.230.0030.00316.70
7.4.220.0070.01016.89
7.4.210.0000.01716.80
7.4.200.0000.00816.66
7.4.160.0120.00416.66
7.4.150.0190.00017.40
7.4.140.0100.00717.86
7.4.130.0060.01116.77
7.4.120.0080.00916.74
7.4.110.0090.00916.73
7.4.100.0120.00616.79
7.4.90.0060.01616.86
7.4.80.0080.01119.39
7.4.70.0140.00316.80
7.4.60.0090.00916.71
7.4.50.0000.00816.71
7.4.40.0070.01416.88
7.4.30.0080.00816.63
7.4.00.0000.01615.35
7.3.330.0000.00713.29
7.3.320.0050.00013.18
7.3.310.0000.00716.39
7.3.300.0070.00016.45
7.3.290.0030.01616.44
7.3.280.0050.01216.44
7.3.270.0040.01217.40
7.3.260.0130.00316.43
7.3.250.0110.00716.56
7.3.240.0140.01016.59
7.3.230.0060.01016.54
7.3.210.0130.00316.86
7.3.200.0040.01219.39
7.3.190.0080.00816.86
7.3.180.0100.00716.41
7.3.170.0130.00316.63
7.3.160.0060.00916.82
7.2.330.0140.00416.75
7.2.320.0100.01216.69
7.2.310.0140.00716.91
7.2.300.0070.01016.90
7.2.290.0090.00616.54
7.2.80.0030.00616.54
7.2.60.0100.00317.25
7.2.00.0090.00319.75
7.1.200.0040.00815.88
7.1.100.0000.01018.17
7.1.70.0030.00317.20
7.1.60.0100.00319.40
7.1.50.0160.00917.20
7.1.00.0030.07722.35
7.0.200.0050.00516.94
7.0.140.0030.07322.07
7.0.60.0170.06719.86
7.0.50.0000.04717.81
7.0.40.0030.05320.06
7.0.30.0500.05720.00
7.0.20.0330.05020.09
7.0.10.0070.08020.16
7.0.00.0070.04720.13
5.6.280.0000.08020.92
5.6.210.0070.06020.64
5.6.200.0100.05318.13
5.6.190.0000.08320.61
5.6.180.0200.03720.48
5.6.170.0300.05020.46
5.6.160.0070.06320.33
5.6.150.0100.08018.13
5.6.140.0000.05018.16
5.6.130.0070.04718.22
5.6.120.0000.05720.89
5.6.110.0200.07021.14
5.6.100.0030.07720.99
5.6.90.0030.08321.03
5.6.80.0030.05320.35
5.5.350.3930.04020.50
5.5.340.0070.07717.92
5.5.330.0070.06320.40
5.5.320.0400.07320.20
5.5.310.0330.06320.15
5.5.300.0070.06317.99
5.5.290.0070.08317.98
5.5.280.0030.06020.88
5.5.270.0100.07720.95
5.5.260.0070.08320.68
5.5.250.0070.04020.54
5.5.240.0130.04020.18
5.4.450.0200.04719.29
5.4.440.0300.04019.57
5.4.430.0400.04019.50
5.4.420.0670.03719.48
5.4.410.0300.03719.41
5.4.400.0370.03019.16
5.4.390.0570.03719.16
5.4.380.0130.05718.72
5.4.370.0070.05718.77
5.4.360.0130.05718.52
5.4.350.0170.05018.63
5.4.340.0130.06318.70
5.4.320.0040.04012.45
5.4.310.0080.04212.45
5.4.300.0060.03612.45
5.4.290.0050.03812.45
5.4.280.0060.04012.35
5.4.270.0020.04012.35
5.4.260.0060.03712.35
5.4.250.0080.03612.35
5.4.240.0070.03412.35
5.4.230.0090.03712.34
5.4.220.0050.03512.34
5.4.210.0050.03712.34
5.4.200.0080.03612.34
5.4.190.0060.03512.34
5.4.180.0090.03312.34
5.4.170.0090.03212.35
5.4.160.0040.03712.34
5.4.150.0070.03912.34
5.4.140.0030.04012.02
5.4.130.0040.03612.02
5.4.120.0040.03611.97
5.4.110.0060.03511.96
5.4.100.0080.03811.97
5.4.90.0060.03811.96
5.4.80.0100.04711.96
5.4.70.0030.03711.96
5.4.60.0070.04211.96
5.4.50.0070.04011.96
5.4.40.0030.03711.96
5.4.30.0070.04411.95
5.4.20.0080.03411.95
5.4.10.0070.03311.95
5.4.00.0070.04011.44
5.3.290.0100.04712.80
5.3.280.0050.03712.71
5.3.270.0050.03812.72
5.3.260.0050.03912.72
5.3.250.0080.03512.72
5.3.240.0060.03612.72
5.3.230.0100.03212.71
5.3.220.0080.03412.68
5.3.210.0060.03812.68
5.3.200.0060.03612.68
5.3.190.0060.03612.68
5.3.180.0080.04012.67
5.3.170.0030.04212.67
5.3.160.0110.03612.67
5.3.150.0050.03712.68
5.3.140.0060.04112.66
5.3.130.0060.03912.66
5.3.120.0080.04112.66
5.3.110.0080.03912.65
5.3.100.0050.03712.12
5.3.90.0070.05112.08
5.3.80.0060.03512.07
5.3.70.0060.03512.07
5.3.60.0040.03712.07
5.3.50.0050.03812.00
5.3.40.0080.03512.00
5.3.30.0080.03211.95
5.3.20.0060.03511.72
5.3.10.0100.02911.69
5.3.00.0090.03911.68
5.2.170.0060.0339.18
5.2.160.0050.0289.18
5.2.150.0040.0309.18
5.2.140.0050.0299.18
5.2.130.0080.0329.13
5.2.120.0070.0299.14
5.2.110.0080.0259.14
5.2.100.0060.0279.14
5.2.90.0020.0309.14
5.2.80.0040.0329.13
5.2.70.0080.0269.14
5.2.60.0040.0309.09
5.2.50.0050.0299.06
5.2.40.0030.0309.03
5.2.30.0040.0299.01
5.2.20.0040.0289.00
5.2.10.0070.0318.94
5.2.00.0020.0368.79
5.1.60.0030.0348.06
5.1.50.0050.0248.06
5.1.40.0060.0268.05
5.1.30.0040.0268.39
5.1.20.0030.0278.42
5.1.10.0070.0238.14
5.1.00.0050.0248.14
5.0.50.0040.0216.62
5.0.40.0030.0266.48
5.0.30.0030.0316.29
5.0.20.0030.0196.27
5.0.10.0040.0196.24
5.0.00.0030.0306.23
4.4.90.0040.0214.78
4.4.80.0010.0224.75
4.4.70.0040.0144.75
4.4.60.0010.0174.75
4.4.50.0070.0134.77
4.4.40.0030.0254.71
4.4.30.0030.0204.76
4.4.20.0030.0184.84
4.4.10.0020.0204.85
4.4.00.0010.0274.76
4.3.110.0040.0214.67
4.3.100.0020.0204.66
4.3.90.0080.0164.64
4.3.80.0020.0264.58
4.3.70.0050.0184.63
4.3.60.0030.0134.63
4.3.50.0040.0194.63
4.3.40.0030.0234.54
4.3.30.0010.0163.28
4.3.20.0010.0163.26
4.3.10.0020.0153.22
4.3.00.0000.01315.96

preferences:
41.45 ms | 401 KiB | 5 Q