3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET['week_of']=20151111; if(!isset($_GET['week_of'][8])&&ctype_digit($_GET['week_of'])&& (DateTime::createFromFormat('Ymd',$_GET['week_of'])->format('N')===1) ){ $week_of=DateTime::createFromFormat('Ymd',$_GET['week_of'])->format('Y-m-d'); }elseif(((new DateTime())->format('N'))==1){ $week_of=new DateTime('this monday'); }else{ $week_of=new DateTime('last monday'); } echo $week_of;

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.0040.01116.75
8.3.50.0050.01322.05
8.3.40.0070.00718.82
8.3.30.0070.00718.90
8.3.20.0000.00820.38
8.3.10.0080.00021.76
8.3.00.0040.00419.75
8.2.180.0040.01118.51
8.2.170.0100.00722.96
8.2.160.0070.01020.39
8.2.150.0060.00324.18
8.2.140.0070.00024.66
8.2.130.0090.00017.75
8.2.120.0050.00326.35
8.2.110.0030.00721.16
8.2.100.0070.00418.09
8.2.90.0030.00518.22
8.2.80.0060.00317.97
8.2.70.0050.00517.85
8.2.60.0040.00418.18
8.2.50.0000.00818.07
8.2.40.0060.00319.41
8.2.30.0000.00720.59
8.2.20.0030.00518.13
8.2.10.0040.00418.31
8.2.00.0060.00318.13
8.1.280.0090.00625.92
8.1.270.0060.00323.82
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0060.01022.61
8.1.230.0070.00320.99
8.1.220.0000.00817.79
8.1.210.0050.00318.79
8.1.200.0030.00617.60
8.1.190.0040.00417.38
8.1.180.0040.00418.10
8.1.170.0050.00318.76
8.1.160.0000.00721.96
8.1.150.0030.00519.03
8.1.140.0030.00619.76
8.1.130.0040.00417.71
8.1.120.0000.00717.80
8.1.110.0050.00317.75
8.1.100.0000.00717.77
8.1.90.0000.00817.62
8.1.80.0040.00417.75
8.1.70.0050.00317.75
8.1.60.0030.00617.70
8.1.50.0040.00417.71
8.1.40.0080.00017.61
8.1.30.0050.00317.76
8.1.20.0040.00417.70
8.1.10.0040.00417.77
8.1.00.0050.00517.66
8.0.300.0040.00420.00
8.0.290.0040.00417.00
8.0.280.0030.00318.59
8.0.270.0070.00017.40
8.0.260.0030.00317.33
8.0.250.0020.00517.30
8.0.240.0050.00317.25
8.0.230.0070.00017.19
8.0.220.0040.00417.10
8.0.210.0000.00717.27
8.0.200.0000.00717.25
8.0.190.0000.00817.17
8.0.180.0000.00917.26
8.0.170.0040.00417.15
8.0.160.0030.00317.14
8.0.150.0070.00017.19
8.0.140.0040.00417.05
8.0.130.0000.00613.54
8.0.120.0000.00817.18
8.0.110.0040.00417.14
8.0.100.0000.00717.25
8.0.90.0040.00417.08
8.0.80.0060.01017.13
8.0.70.0080.00017.20
8.0.60.0080.00017.21
8.0.50.0040.00417.26
8.0.30.0100.00917.45
8.0.20.0130.00617.46
8.0.10.0040.00417.32
8.0.00.0090.00817.19
7.4.330.0000.00516.79
7.4.320.0060.00016.61
7.4.300.0000.00716.80
7.4.290.0070.00016.82
7.4.280.0040.00416.71
7.4.270.0000.00716.75
7.4.260.0000.00716.71
7.4.250.0080.00016.64
7.4.240.0030.00516.83
7.4.230.0070.00016.80
7.4.220.0040.01516.75
7.4.210.0090.00616.75
7.4.200.0030.00316.82
7.4.160.0110.00316.62
7.4.150.0030.01317.40
7.4.140.0090.01217.86
7.4.130.0130.00816.80
7.4.120.0110.00716.82
7.4.110.0040.01316.97
7.4.100.0120.01116.69
7.4.90.0080.00816.61
7.4.80.0030.01319.39
7.4.70.0090.00916.71
7.4.60.0030.01316.86
7.4.50.0100.00316.55
7.4.40.0030.01316.98
7.4.30.0030.01416.75
7.4.00.0090.00815.22
7.3.330.0000.00613.50
7.3.320.0050.00013.42
7.3.310.0070.00016.43
7.3.300.0030.00316.55
7.3.290.0070.00016.38
7.3.280.0050.01316.61
7.3.270.0120.01217.40
7.3.260.0000.01616.58
7.3.240.0100.00916.71
7.3.230.0000.01916.69
7.3.210.0160.00616.76
7.3.200.0100.00716.78
7.3.190.0160.00616.76
7.3.180.0150.00316.94
7.3.170.0110.00816.84
7.3.160.0100.00616.89
7.3.120.0090.00915.16
7.3.110.0070.01115.21
7.3.100.0040.01014.98
7.3.90.0070.00615.04
7.3.80.0060.00515.21
7.3.70.0050.00515.07
7.3.60.0070.00514.98
7.3.50.0060.00615.14
7.3.40.0100.00614.94
7.3.30.0000.01315.10
7.3.20.0060.00616.90
7.3.10.0070.00716.79
7.3.00.0100.00716.81
7.2.330.0100.01016.81
7.2.320.0100.00716.88
7.2.310.0000.01716.72
7.2.300.0100.01316.64
7.2.290.0110.00717.09
7.2.250.0080.01115.51
7.2.240.0090.01215.41
7.2.230.0060.00915.39
7.2.220.0050.00815.28
7.2.210.0120.00215.38
7.2.200.0090.00315.19
7.2.190.0110.00515.31
7.2.180.0090.00915.31
7.2.170.0070.00915.10
7.2.130.0120.00717.06
7.2.120.0110.00617.01
7.2.110.0090.00816.99
7.2.100.0120.00717.00
7.2.90.0100.00917.17
7.2.80.0150.00516.91
7.2.70.0090.01016.99
7.2.60.0160.00516.96
7.2.50.0130.00817.03
7.2.40.0100.01017.10
7.2.30.0220.00517.09
7.2.20.0130.00716.97
7.2.10.0180.01017.32
7.2.00.0100.00717.97
7.1.330.0020.01116.07
7.1.320.0070.00815.67
7.1.310.0040.00816.05
7.1.300.0080.00716.04
7.1.290.0100.00515.90
7.1.280.0050.00816.01
7.1.270.0020.01115.71
7.1.260.0050.00515.80
7.1.250.0070.00515.89
7.1.200.0040.00916.11
7.1.100.0040.01118.36
7.1.70.0000.00717.09
7.1.60.0090.01519.48
7.1.50.0030.00817.08
7.1.00.0000.08022.42
7.0.200.0280.00414.88
7.0.60.0070.05020.07
7.0.50.0030.04317.69
7.0.40.0030.06320.12
7.0.30.0400.07020.21
7.0.20.0200.04320.33
7.0.10.0130.04720.16
7.0.00.0070.05019.99
5.6.210.0000.08720.71
5.6.200.0000.04318.24
5.6.190.0000.05020.45
5.6.180.0270.03320.77
5.6.170.0200.03720.48
5.6.160.0030.07720.72
5.6.150.0070.07018.12
5.6.140.0030.08018.21
5.6.130.0070.08018.16
5.6.120.0070.09020.98
5.6.110.0100.08020.98
5.6.100.0100.04021.00
5.6.90.0100.06720.92
5.6.80.0170.07020.40
5.5.350.0070.07720.32
5.5.340.0030.05717.91
5.5.330.0100.08020.29
5.5.320.0000.06320.19
5.5.310.0300.04320.50
5.5.300.0130.04017.88
5.5.290.0030.06017.95
5.5.280.0100.08320.87
5.5.270.0130.07720.75
5.5.260.0030.04020.95
5.5.250.0100.08020.57
5.5.240.0270.06320.15

preferences:
38.82 ms | 401 KiB | 5 Q