3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = date('l'); if($test = "Sunday"){ $end = strtotime('Sunday last week'); $start = date('Y-m-d',strtotime('Monday last week')); }else{ $end = strtotime('Sunday this week'); $start = date('Y-m-d',strtotime('Monday last week')); } echo $start;

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.00716.88
8.3.50.0130.00316.46
8.3.40.0150.00318.92
8.3.30.0090.00918.84
8.3.20.0040.00420.27
8.3.10.0000.00723.48
8.3.00.0040.00423.46
8.2.180.0160.00318.54
8.2.170.0120.00322.96
8.2.160.0040.01120.40
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00021.20
8.2.120.0080.00026.35
8.2.110.0080.00322.32
8.2.100.0060.00617.97
8.2.90.0030.00519.30
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0000.00918.16
8.2.50.0060.00318.07
8.2.40.0040.00422.33
8.2.30.0000.00720.64
8.2.20.0040.00417.97
8.2.10.0030.00718.16
8.2.00.0040.00418.16
8.1.280.0100.01025.92
8.1.270.0050.00323.99
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0030.00623.96
8.1.230.0070.00417.64
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0080.00018.77
8.1.160.0040.00420.79
8.1.150.0040.00419.02
8.1.140.0030.00519.75
8.1.130.0080.00017.68
8.1.120.0100.00017.54
8.1.110.0000.00717.54
8.1.100.0000.00717.62
8.1.90.0040.00417.53
8.1.80.0040.00417.61
8.1.70.0050.00317.63
8.1.60.0000.00817.74
8.1.50.0000.00817.62
8.1.40.0040.00417.55
8.1.30.0000.00817.69
8.1.20.0000.00817.72
8.1.10.0030.00517.62
8.1.00.0000.00917.75
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0050.00318.48
8.0.270.0000.00717.34
8.0.260.0030.00317.38
8.0.250.0030.00317.22
8.0.240.0000.00717.21
8.0.230.0030.00317.11
8.0.220.0000.00717.11
8.0.210.0000.00717.01
8.0.200.0000.00717.15
8.0.190.0070.00017.19
8.0.180.0000.00817.16
8.0.170.0040.00417.14
8.0.160.0040.00416.96
8.0.150.0050.00317.06
8.0.140.0040.00317.05
8.0.130.0000.00713.41
8.0.120.0070.00017.02
8.0.110.0000.00817.13
8.0.100.0040.00416.96
8.0.90.0000.00716.95
8.0.80.0070.01017.07
8.0.70.0040.00417.06
8.0.60.0050.00317.11
8.0.50.0000.00717.11
8.0.30.0120.00617.09
8.0.20.0100.00917.40
8.0.10.0070.00017.10
8.0.00.0120.00917.02
7.4.330.0000.00516.90
7.4.320.0000.00716.73
7.4.300.0030.00316.55
7.4.290.0000.00716.60
7.4.280.0040.00416.71
7.4.270.0000.00616.74
7.4.260.0000.01016.52
7.4.250.0030.00516.67
7.4.240.0050.00216.75
7.4.230.0050.00216.84
7.4.220.0090.00916.80
7.4.210.0090.00616.68
7.4.200.0020.00516.84
7.4.160.0110.00716.59
7.4.150.0110.00817.40
7.4.140.0090.00917.86
7.4.130.0100.00816.59
7.4.120.0070.01316.79
7.4.110.0060.01216.75
7.4.100.0060.01216.68
7.4.90.0100.00716.46
7.4.80.0110.01419.39
7.4.70.0110.00716.59
7.4.60.0130.00316.68
7.4.50.0040.00816.45
7.4.40.0130.00716.37
7.4.30.0080.00816.84
7.4.00.0000.01715.12
7.3.330.0020.00213.13
7.3.320.0050.00013.24
7.3.310.0080.00016.41
7.3.300.0030.00316.38
7.3.290.0090.00816.40
7.3.280.0090.01116.38
7.3.270.0140.00717.40
7.3.260.0100.00716.46
7.3.250.0080.01016.43
7.3.240.0100.00716.50
7.3.230.0070.01016.61
7.3.210.0110.00916.52
7.3.200.0160.00616.54
7.3.190.0090.01316.35
7.3.180.0140.00916.56
7.3.170.0140.00716.62
7.3.160.0040.01316.53
7.3.10.0170.00516.80
7.3.00.0120.00816.82
7.2.330.0030.01316.64
7.2.320.0100.00716.69
7.2.310.0000.01616.66
7.2.300.0060.01116.53
7.2.290.0120.00816.63
7.2.130.0110.00516.92
7.2.120.0140.00616.82
7.2.110.0070.00916.77
7.2.100.0120.00616.81
7.2.90.0130.01017.04
7.2.80.0050.01517.00
7.2.70.0110.00916.79
7.2.60.0110.00616.94
7.2.50.0100.00716.79
7.2.40.0080.01116.84
7.2.30.0140.00816.98
7.2.20.0140.00516.94
7.2.10.0100.00716.66
7.2.00.0050.01117.84
7.1.250.0110.00915.52
7.1.200.0030.01016.07
7.1.100.0050.00518.20
7.1.70.0000.00717.32
7.1.60.0100.01619.06
7.1.50.0100.01017.05
7.1.00.0130.08022.54
7.0.200.0310.00715.11
7.0.80.0330.08319.96
7.0.70.0200.07019.82
7.0.60.0600.07319.95
7.0.50.0500.05720.34
7.0.40.0130.07320.14
7.0.30.0070.05320.13
7.0.20.0030.06720.13
7.0.10.0030.04720.09
7.0.00.0070.04320.12
5.6.280.0000.07021.09
5.6.230.0100.08020.63
5.6.220.0070.08720.49
5.6.210.0130.07320.64
5.6.200.0100.08321.02
5.6.190.0070.05321.05
5.6.180.0030.09021.02
5.6.170.0000.05321.05
5.6.160.0070.05321.01
5.6.150.0070.06321.05
5.6.140.0100.07321.07
5.6.130.0100.05721.05
5.6.120.0030.05020.94
5.6.110.0100.07321.09
5.6.100.0130.07320.94
5.6.90.0100.09021.05
5.6.80.0130.07720.55
5.6.70.0000.04720.39
5.6.60.0070.04720.54
5.6.50.0030.06720.32
5.6.40.0130.04020.40
5.6.30.0030.04320.32
5.6.20.0130.05320.30
5.6.10.0170.04320.52
5.6.00.0070.04320.36
5.5.370.0070.07720.37
5.5.360.0070.06720.31
5.5.350.0070.05320.33
5.5.340.0130.07020.77
5.5.330.0130.07320.91
5.5.320.0100.08320.82
5.5.310.0100.08320.86
5.5.300.0030.07320.73
5.5.290.0100.08320.91
5.5.280.0130.08020.82
5.5.270.0130.07320.76
5.5.260.0200.07320.79
5.5.250.0070.09020.58
5.5.240.0130.04720.29
5.5.230.0130.04320.28
5.5.220.0070.08020.29
5.5.210.0070.05020.27
5.5.200.0200.06720.17
5.5.190.0070.07720.23
5.5.180.0130.07320.25
5.5.160.0030.06020.11
5.5.150.0100.03720.07
5.5.140.0070.06320.11
5.5.130.0170.06720.14
5.5.120.0030.08720.23
5.5.110.0130.07320.26
5.5.100.0070.05720.09
5.5.90.0030.07320.06
5.5.80.0070.07020.06
5.5.70.0100.07320.14
5.5.60.0100.06320.07
5.5.50.0130.07020.13
5.5.40.0070.08320.14
5.5.30.0100.07319.92
5.5.20.0070.08020.07
5.5.10.0170.07020.03
5.5.00.0030.07020.02

preferences:
41.96 ms | 400 KiB | 5 Q