3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sunday = 0; $monday = 1; $saturday =6; $date = new \DateTime(/* any point in time and space */); $weekStart = (new \DateTime())->setISODate((int)$date->format('o'), (int)$date->format('W'), $monday)->setTime(0, 0, 0); $weekEnd = (new \DateTime())->setISODate((int)$date->format('o'), (int)$date->format('W') + 1, $sunday)->setTime(23, 59, 59); echo $weekStart->format('Y m d H:i:s') . '->' . $weekEnd('Y m d H:i:s');

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.5.10.0110.00620.21
8.5.00.0120.00920.43
8.4.160.0130.00823.61
8.4.150.0060.00616.97
8.4.140.0100.01017.88
8.4.130.0130.00818.03
8.4.120.0130.00720.79
8.4.110.0100.00720.51
8.4.100.0100.01118.76
8.4.90.0110.00920.43
8.4.80.0080.00419.02
8.4.70.0050.00819.03
8.4.60.0090.00218.95
8.4.50.0060.00319.02
8.4.40.0150.00618.29
8.4.30.0040.01218.03
8.4.20.0070.01318.30
8.4.10.0110.00717.83
8.3.280.0010.00014.05
8.3.270.0080.01116.85
8.3.260.0120.00816.75
8.3.250.0110.00819.18
8.3.240.0130.00516.80
8.3.230.0110.00916.85
8.3.220.0110.00718.70
8.3.210.0100.00816.80
8.3.200.0050.00416.98
8.3.190.0100.00917.19
8.3.180.0090.00418.78
8.3.170.0150.00416.95
8.3.160.0140.00417.13
8.3.150.0090.00917.13
8.3.140.0030.00619.04
8.3.130.0040.00418.47
8.3.120.0040.00420.59
8.3.110.0070.01016.78
8.3.100.0030.00716.84
8.3.90.0000.00818.48
8.3.80.0030.00618.43
8.3.70.0000.01418.68
8.3.60.0110.00416.63
8.3.50.0100.00823.00
8.3.40.0100.01318.95
8.3.30.0100.00719.17
8.3.20.0040.00420.26
8.3.10.0000.00920.70
8.3.00.0100.00718.89
8.2.290.0100.00620.60
8.2.280.0030.00420.48
8.2.270.0110.00716.67
8.2.260.0060.01316.75
8.2.250.0000.00818.54
8.2.240.0090.00017.58
8.2.230.0060.00320.94
8.2.220.0020.00524.06
8.2.210.0070.00026.77
8.2.200.0040.00718.79
8.2.190.0070.00716.88
8.2.180.0070.01118.66
8.2.170.0110.00322.96
8.2.160.0140.00020.39
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0060.00319.48
8.2.110.0080.00322.21
8.2.100.0070.00417.91
8.2.90.0030.00618.16
8.2.80.0030.00617.97
8.2.70.0060.00317.75
8.2.60.0030.00618.03
8.2.50.0080.00018.07
8.2.40.0070.00018.09
8.2.30.0000.00721.29
8.2.20.0000.00917.88
8.2.10.0040.00418.23
8.2.00.0090.00017.89
8.1.330.0050.00421.78
8.1.320.0090.01018.07
8.1.310.0090.00916.27
8.1.300.0040.00417.97
8.1.290.0070.00718.88
8.1.280.0070.00725.92
8.1.270.0000.00723.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.25
8.1.230.0000.01120.97
8.1.220.0050.00317.88
8.1.210.0040.00418.89
8.1.200.0060.00317.48
8.1.190.0030.00517.66
8.1.180.0080.00018.10
8.1.170.0040.00418.63
8.1.160.0070.00018.88
8.1.150.0000.00819.02
8.1.140.0040.00417.64
8.1.130.0040.00417.82
8.1.120.0050.00217.56
8.1.110.0000.00817.71
8.1.100.0050.00217.54
8.1.90.0070.00017.69
8.1.80.0020.00517.56
8.1.70.0000.00717.66
8.1.60.0090.00017.73
8.1.50.0030.00617.54
8.1.40.0040.00417.68
8.1.30.0030.00517.85
8.1.20.0000.00817.79
8.1.10.0030.00617.67
8.1.00.0020.00517.59
8.0.300.0040.00419.89
8.0.290.0070.00017.18
8.0.280.0040.00418.59
8.0.270.0000.00717.32
8.0.260.0030.00517.21
8.0.250.0030.00317.14
8.0.240.0080.00017.20
8.0.230.0040.00417.19
8.0.220.0070.00017.01
8.0.210.0020.00517.06
8.0.200.0030.00317.22
8.0.190.0040.00417.16
8.0.180.0050.00317.07
8.0.170.0050.00317.14
8.0.160.0030.00617.13
8.0.150.0040.00417.08
8.0.140.0080.00017.17
8.0.130.0070.00013.48
8.0.120.0030.00517.13
8.0.110.0070.00017.15
8.0.100.0050.00317.22
8.0.90.0050.00317.29
8.0.80.0030.01217.12
8.0.70.0040.00417.22
8.0.60.0070.00016.89
8.0.50.0000.00817.16
8.0.30.0070.01117.24
8.0.20.0170.00717.49
8.0.10.0040.00417.07
8.0.00.0110.00717.12
7.4.330.0040.00415.02
7.4.320.0030.00316.71
7.4.300.0060.00016.66
7.4.290.0040.00416.64
7.4.280.0030.00316.63
7.4.270.0000.00716.58
7.4.260.0000.01016.64
7.4.250.0070.00016.75
7.4.240.0020.00516.59
7.4.230.0030.00316.67
7.4.220.0130.01316.79
7.4.210.0040.01116.57
7.4.200.0070.00016.80
7.4.160.0110.00616.53
7.4.150.0000.01717.40
7.4.140.0110.01117.86
7.4.130.0130.00716.73
7.4.120.0060.01216.74
7.4.110.0110.00716.91
7.4.100.0080.01116.74
7.4.90.0090.00916.68
7.4.80.0100.00716.73
7.4.70.0100.00716.72
7.4.60.0060.01116.62
7.4.50.0000.00816.72
7.4.40.0090.00916.58
7.4.30.0090.01316.64
7.4.00.0050.01115.16
7.3.330.0030.00313.16
7.3.320.0000.00613.24
7.3.310.0000.00716.24
7.3.300.0030.00316.51
7.3.290.0120.00416.46
7.3.280.0070.00916.41
7.3.270.0100.00717.40
7.3.260.0190.01016.55
7.3.250.0190.00616.64
7.3.240.0040.01716.79
7.3.230.0190.00416.57
7.3.210.0110.00516.56
7.3.200.0090.00919.39
7.3.190.0110.00716.51
7.3.180.0070.01016.71
7.3.170.0040.01216.67
7.3.160.0030.01216.74
7.3.120.0130.00314.96
7.3.110.0040.01515.05
7.3.100.0070.01315.15
7.3.90.0000.01715.05
7.3.80.0080.00414.79
7.3.70.0090.00015.04
7.3.60.0000.01314.98
7.3.50.0050.00914.88
7.3.40.0000.01314.86
7.3.30.0000.01214.85
7.3.20.0090.00316.83
7.3.10.0040.00716.87
7.3.00.0100.00416.81
7.2.330.0090.00916.88
7.2.320.0100.00616.71
7.2.310.0050.01116.89
7.2.300.0000.02216.59
7.2.290.0140.00716.71
7.2.250.0110.00715.04
7.2.240.0100.01015.45
7.2.230.0030.01015.43
7.2.220.0100.00715.30
7.2.210.0030.00715.11
7.2.200.0030.01015.38
7.2.190.0040.00415.18
7.2.180.0080.00415.20
7.2.170.0070.00415.20
7.2.160.0040.00714.99
7.2.150.0130.00617.13
7.2.140.0090.00617.14
7.2.130.0120.00517.02
7.2.120.0080.00616.93
7.2.110.0050.01017.13
7.2.100.0080.00316.99
7.2.90.0100.00417.11
7.2.80.0080.00616.98
7.2.70.0070.00717.10
7.2.60.0080.00817.04
7.2.50.0050.00716.82
7.2.40.0070.00817.01
7.2.30.0030.00817.04
7.2.20.0060.00617.08
7.2.10.0060.00617.07
7.2.00.0050.00617.80
7.1.330.0130.00615.97
7.1.320.0060.00915.97
7.1.310.0090.00016.00
7.1.300.0070.00716.00
7.1.290.0060.00915.81
7.1.280.0030.01215.95
7.1.270.0000.01415.96
7.1.260.0060.00915.81
7.1.250.0060.00915.85
7.1.240.0070.00715.78
7.1.230.0040.01215.97
7.1.220.0040.01215.54
7.1.210.0000.01415.87
7.1.200.0020.01415.65
7.1.190.0100.00315.68
7.1.180.0000.00815.93
7.1.170.0120.00315.92
7.1.160.0100.00615.92
7.1.150.0030.01015.54
7.1.140.0080.00415.91
7.1.130.0110.00015.89
7.1.120.0070.00415.59
7.1.110.0000.01615.89
7.1.100.0040.00617.00
7.1.90.0040.01116.11
7.1.80.0090.00315.97
7.1.70.0060.00516.53
7.1.60.0030.01617.73
7.1.50.0080.00916.43
7.1.40.0070.00816.03
7.1.30.0130.00615.71
7.1.20.0070.00715.93
7.1.10.0090.00615.97
7.1.00.0050.04319.11
7.0.330.0060.00915.34
7.0.320.0090.00615.52
7.0.310.0030.01015.58
7.0.300.0060.00615.62
7.0.290.0030.01015.71
7.0.280.0070.00715.50
7.0.270.0070.00415.52
7.0.260.0040.01115.64
7.0.250.0080.00015.55
7.0.240.0090.00315.58
7.0.230.0140.00015.45
7.0.220.0030.01315.60
7.0.210.0030.00615.61
7.0.200.0030.00816.10
7.0.190.0100.00315.66
7.0.180.0030.00615.58
7.0.170.0040.01115.62
7.0.160.0030.01315.59
7.0.150.0100.00315.66
7.0.140.0030.02318.80
7.0.130.0040.01115.68
7.0.120.0030.01015.25
7.0.110.0070.00715.59
7.0.100.0060.00615.46
7.0.90.0060.01015.46
7.0.80.0060.00615.33
7.0.70.0030.00715.47
7.0.60.0080.04117.80
7.0.50.0050.03216.70
7.0.40.0080.03716.85
7.0.30.0160.03716.90
7.0.20.0140.02616.90
7.0.10.0080.03516.85
7.0.00.0030.02716.80
5.6.400.0090.00414.50
5.6.390.0080.00414.58
5.6.380.0090.00614.04
5.6.370.0060.00914.15
5.6.360.0000.01314.15
5.6.350.0060.00314.46
5.6.340.0060.00914.32
5.6.330.0030.00914.29
5.6.320.0070.00714.46
5.6.310.0100.00314.53
5.6.300.0000.00814.16
5.6.290.0000.01014.55
5.6.280.0060.03817.70
5.6.270.0030.01314.58
5.6.260.0030.01014.53
5.6.250.0000.01414.21
5.6.240.0070.01114.51
5.6.230.0100.00714.20
5.6.220.0060.00614.55
5.6.210.0090.03117.47
5.6.200.0030.04916.24
5.6.190.0030.05117.58
5.6.180.1570.02617.56
5.6.170.0120.04017.44
5.6.160.0050.02717.60
5.6.150.0050.03816.12
5.6.140.0050.04516.29
5.6.130.0080.04316.24
5.6.120.0070.04817.82
5.6.110.0080.04517.70
5.6.100.0110.02517.68
5.6.90.0160.02017.75
5.6.80.0070.03717.37
5.6.70.0030.00614.27
5.6.60.0030.01014.42
5.6.50.0070.00414.39
5.6.40.0140.00014.29
5.6.30.0000.01514.32
5.6.20.0070.00714.52
5.6.10.0060.00914.49
5.6.00.0030.00714.41
5.5.380.0000.01614.47
5.5.370.0080.00814.51
5.5.360.0080.00414.32
5.5.350.0060.04217.45
5.5.340.0130.02516.24
5.5.330.0000.02817.46
5.5.320.0040.02417.30
5.5.310.0230.04017.45
5.5.300.0080.04016.19
5.5.290.0100.03916.04
5.5.280.0060.02617.74
5.5.270.0050.03017.69
5.5.260.0070.02417.58
5.5.250.0070.03017.51
5.5.240.0030.02617.23
5.5.230.0030.01014.27
5.5.220.0000.01014.28
5.5.210.0120.00014.00
5.5.200.0070.01014.45
5.5.190.0110.00714.16
5.5.180.0030.01014.52
5.5.170.0070.00314.34
5.5.160.0040.00714.50
5.5.150.0070.01014.54
5.5.140.0030.01214.27
5.5.130.0000.01514.44
5.5.120.0070.01014.17
5.5.110.0030.01014.34
5.5.100.0070.00713.95
5.5.90.0090.00614.54
5.5.80.0060.00914.21
5.5.70.0090.00614.23
5.5.60.0030.00814.25
5.5.50.0000.01314.41
5.5.40.0040.01114.50
5.5.30.0060.00614.41
5.5.20.0030.00914.60
5.5.10.0070.00714.20
5.5.00.0090.00014.09
5.4.450.0090.02715.99
5.4.440.0520.02316.07
5.4.430.0090.02115.89
5.4.420.0070.03416.02
5.4.410.0120.02515.96
5.4.400.0100.02815.85
5.4.390.0060.02915.81
5.4.380.0030.03315.85
5.4.370.0070.03615.81
5.4.360.0070.03115.81
5.4.350.0060.02512.27
5.4.340.0110.02212.27
5.4.330.0060.00612.57
5.4.320.0040.02612.51
5.4.310.0050.02312.51
5.4.300.0070.02012.51
5.4.290.0080.02612.51
5.4.280.0080.02112.46
5.4.270.0020.02712.46
5.4.260.0050.02912.46
5.4.250.0080.02412.46
5.4.240.0040.02612.46
5.4.230.0080.02312.46
5.4.220.0040.02712.46
5.4.210.0090.02012.46
5.4.200.0050.02812.46
5.4.190.0050.02312.46
5.4.180.0040.02312.45
5.4.170.0040.02412.46
5.4.160.0060.02412.46
5.4.150.0080.03112.46
5.4.140.0120.04012.30
5.4.130.0100.02812.29
5.4.120.0080.02412.27
5.4.110.0070.02412.27
5.4.100.0030.02312.27
5.4.90.0090.02412.27
5.4.80.0100.04112.27
5.4.70.0100.03912.27
5.4.60.0180.04112.27
5.4.50.0090.04012.26
5.4.40.0030.03012.26
5.4.30.0050.02812.26
5.4.20.0030.03412.26
5.4.10.0050.02612.26
5.4.00.0040.02812.00
5.3.290.0090.06312.80
5.3.280.0100.04112.71
5.3.270.0070.04712.73
5.3.260.0050.04512.72
5.3.250.0070.04112.72
5.3.240.0060.04412.72
5.3.230.0040.04412.71
5.3.220.0090.05112.68
5.3.210.0090.04412.68
5.3.200.0120.05512.68
5.3.190.0110.04212.68
5.3.180.0100.03912.67
5.3.170.0120.03912.66
5.3.160.0100.03312.67
5.3.150.0110.04412.67
5.3.140.0080.03812.66
5.3.130.0080.04012.66
5.3.120.0080.04112.66
5.3.110.0060.05012.66
5.3.100.0100.03612.12
5.3.90.0090.04512.08
5.3.80.0060.03712.08
5.3.70.0110.03512.08
5.3.60.0070.03912.06
5.3.50.0100.04212.02
5.3.40.0060.04312.00
5.3.30.0070.03711.96
5.3.20.0090.03511.74
5.3.10.0080.03611.71
5.3.00.0060.04011.70
5.2.170.0090.0309.19
5.2.160.0070.0379.18
5.2.150.0080.0329.19
5.2.140.0080.0319.18
5.2.130.0060.0369.14
5.2.120.0080.0399.14
5.2.110.0080.0279.14
5.2.100.0090.0329.14
5.2.90.0100.0259.14
5.2.80.0070.0299.14
5.2.70.0060.0329.14
5.2.60.0050.0329.09
5.2.50.0100.0379.06
5.2.40.0060.0329.04
5.2.30.0080.0409.01
5.2.20.0060.0359.00
5.2.10.0070.0278.93
5.2.00.0060.0308.79
5.1.60.0080.0438.07
5.1.50.0060.0338.07
5.1.40.0050.0358.05
5.1.30.0040.0428.40
5.1.20.0070.0268.42
5.1.10.0060.0258.15
5.1.00.0050.0268.15
5.0.50.0080.0196.62
5.0.40.0020.0236.48
5.0.30.0010.0366.29
5.0.20.0060.0336.26
5.0.10.0060.0416.24
5.0.00.0060.0436.23
4.4.90.0050.0184.78
4.4.80.0040.0214.76
4.4.70.0030.0214.76
4.4.60.0060.0194.75
4.4.50.0030.0224.77
4.4.40.0070.0424.71
4.4.30.0040.0204.76
4.4.20.0050.0224.85
4.4.10.0040.0194.85
4.4.00.0030.0304.76
4.3.110.0010.0234.67
4.3.100.0040.0204.67
4.3.90.0040.0144.63
4.3.80.0060.0504.59
4.3.70.0040.0184.63
4.3.60.0080.0304.62
4.3.50.0060.0254.63
4.3.40.0040.0284.54
4.3.30.0020.0253.28
4.3.20.0030.0173.26
4.3.10.0010.0193.22
4.3.00.0030.04313.23

preferences:
31.65 ms | 403 KiB | 5 Q