3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getDay($day) { $days = ['Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3, 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6, 'Sunday' => 7]; $today = new \DateTime(); $today->setISODate((int)$today->format('o'), (int)$today->format('W'), $days[ucfirst($day)]); return $today; } var_dump(getDay('Monday')->format('l dS F Y')); var_dump(getDay('Friday')->format('l dS F Y'));

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.4.20.0070.00317.97
8.4.10.0000.00817.70
8.3.150.0090.00617.50
8.3.140.0080.00017.27
8.3.130.0080.00016.52
8.3.120.0100.01019.18
8.3.110.0060.00316.87
8.3.100.0040.00424.06
8.3.90.0150.00426.77
8.3.80.0050.00517.97
8.3.70.0120.00416.97
8.3.60.0110.00718.55
8.3.50.0110.00822.01
8.3.40.0030.01218.95
8.3.30.0000.01419.22
8.3.20.0040.00420.33
8.3.10.0080.00021.82
8.3.00.0000.00822.46
8.2.260.0000.00818.89
8.2.250.0080.00818.56
8.2.240.0050.00317.39
8.2.230.0040.00420.94
8.2.220.0080.00037.54
8.2.210.0140.00426.77
8.2.200.0040.00716.63
8.2.190.0150.00318.80
8.2.180.0110.00718.29
8.2.170.0130.00318.96
8.2.160.0120.00822.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00319.67
8.2.110.0080.00021.06
8.2.100.0080.00417.84
8.2.90.0070.00019.39
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0000.00817.75
8.2.50.0040.00417.73
8.2.40.0050.00717.75
8.2.30.0050.00717.95
8.2.20.0050.00317.71
8.2.10.0050.00717.83
8.2.00.0070.00717.90
8.1.310.0030.01416.85
8.1.300.0060.00319.89
8.1.290.0090.00018.88
8.1.280.0070.00725.92
8.1.270.0080.00823.73
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00421.88
8.1.230.0090.00619.01
8.1.220.0040.00417.79
8.1.210.0000.00918.83
8.1.200.0030.00517.50
8.1.190.0030.00517.25
8.1.180.0080.00418.10
8.1.170.0080.00418.29
8.1.160.0090.00419.74
8.1.150.0040.00818.23
8.1.140.0080.00417.62
8.1.130.0080.00417.58
8.1.120.0080.00417.54
8.1.110.0060.00617.63
8.1.100.0080.00417.57
8.1.90.0050.00617.63
8.1.80.0080.00417.62
8.1.70.0050.00717.62
8.1.60.0090.00517.65
8.1.50.0110.00317.67
8.1.40.0080.00617.58
8.1.30.0110.00317.64
8.1.20.0090.00417.70
8.1.10.0080.00417.60
8.1.00.0100.00217.62
8.0.300.0070.00019.98
8.0.290.0040.00416.88
8.0.280.0060.00618.04
8.0.270.0080.00717.29
8.0.260.0080.00417.29
8.0.250.0100.00217.36
8.0.240.0090.00517.35
8.0.230.0020.01017.35
8.0.220.0050.00617.32
8.0.210.0070.00517.35
8.0.200.0100.00217.29
8.0.190.0090.00417.33
8.0.180.0060.00717.36
8.0.170.0080.00417.37
8.0.160.0060.00717.28
8.0.150.0090.00417.30
8.0.140.0050.00717.17
8.0.130.0090.00215.95
8.0.120.0090.00317.21
8.0.110.0080.00317.19
8.0.100.0080.00417.17
8.0.90.0070.00517.12
8.0.80.0060.00617.20
8.0.70.0080.00317.20
8.0.60.0060.00517.12
8.0.50.0060.00517.14
8.0.30.0090.00917.10
8.0.20.0090.00917.22
8.0.10.0090.00817.20
8.0.00.0100.00717.09
7.4.330.0070.00216.33
7.4.320.0080.00317.14
7.4.300.0030.00616.88
7.4.290.0030.00917.13
7.4.280.0060.00617.14
7.4.270.0060.00517.02
7.4.260.0070.00516.99
7.4.250.0050.00617.00
7.4.240.0090.00216.88
7.4.230.0050.00516.82
7.4.220.0080.00516.92
7.4.210.0050.00816.89
7.4.200.0060.00416.91
7.4.190.0080.00417.05
7.4.180.0070.00617.06
7.4.160.0090.00816.80
7.4.150.0080.00816.91
7.4.140.0090.00816.99
7.4.130.0100.00816.69
7.4.120.0110.00816.63
7.4.110.0100.00816.64
7.4.100.0110.00816.74
7.4.90.0100.00716.74
7.4.80.0110.00716.99
7.4.70.0120.00716.68
7.4.60.0120.00716.66
7.4.50.0110.00816.62
7.4.40.0120.00716.65
7.4.30.0110.00916.62
7.4.20.0110.00816.66
7.4.10.0100.01016.55
7.4.00.0090.01016.46
7.3.330.0090.00415.79
7.3.320.0080.00615.75
7.3.310.0090.00616.84
7.3.300.0100.00416.75
7.3.290.0100.00816.69
7.3.280.0100.00716.61
7.3.270.0070.01016.72
7.3.260.0100.00716.61
7.3.250.0130.00616.65
7.3.240.0110.00916.64
7.3.230.0110.00916.59
7.3.220.0120.00716.57
7.3.210.0110.00816.60
7.3.200.0120.00816.56
7.3.190.0120.00816.56
7.3.180.0130.00616.57
7.3.170.0140.00716.59
7.3.160.0110.00816.57
7.3.150.0110.00916.56
7.3.140.0110.00816.56
7.3.130.0130.00816.55
7.3.120.0110.00816.45
7.3.110.0120.00916.21
7.3.100.0100.00916.03
7.3.90.0100.00916.11
7.3.80.0120.00815.99
7.3.70.0110.00915.92
7.3.60.0110.00815.97
7.3.50.0110.00815.96
7.3.40.0110.00715.92
7.3.30.0130.00615.98
7.3.20.0160.00816.30
7.3.10.0170.00916.27
7.3.00.0250.00816.09
7.2.340.0150.00916.73
7.2.330.0140.00816.72
7.2.320.0130.01016.75
7.2.310.0170.00816.77
7.2.300.0150.01016.78
7.2.290.0160.00716.79
7.2.280.0150.00716.72
7.2.270.0150.00916.78
7.2.260.0140.00916.70
7.2.250.0130.01016.63
7.2.240.0120.01016.41
7.2.230.0120.00916.30
7.2.220.0130.00816.21
7.2.210.0120.00816.27
7.2.200.0130.00916.21
7.2.190.0130.00816.20
7.2.180.0140.00716.20
7.2.170.0160.00816.18
7.2.160.0130.00816.26
7.2.150.0140.01116.52
7.2.140.0180.00716.53
7.2.130.0250.01016.40
7.2.120.0240.01016.27
7.2.110.0260.00916.21
7.2.100.0450.01016.12
7.2.90.0480.00916.13
7.2.80.0510.00916.13
7.2.70.0350.01116.17
7.2.60.0410.01016.15
7.2.50.0350.01016.17
7.2.40.0430.00816.26
7.2.30.0410.00916.17
7.2.20.0380.00916.13
7.2.10.0350.00916.13
7.2.00.0320.00816.17
7.1.330.0170.00816.01
7.1.320.0130.00915.60
7.1.310.0140.00815.65
7.1.300.0190.00915.53
7.1.290.0140.00915.58
7.1.280.0130.00915.60
7.1.270.0150.00815.53
7.1.260.0130.01015.51
7.1.250.0260.00815.22
7.1.240.0230.01015.19
7.1.230.0260.00915.19
7.1.220.0560.00715.00
7.1.210.0530.00715.07
7.1.200.0500.00815.01
7.1.190.0400.00815.03
7.1.180.0360.00915.00
7.1.170.0390.00815.04
7.1.160.0400.00815.08
7.1.150.0400.00715.02
7.1.140.0380.00815.07
7.1.130.0310.00915.06
7.1.120.0350.00715.08
7.1.110.0370.01015.13
7.1.100.0340.00815.06
7.1.90.0380.00815.09
7.1.80.0270.00815.10
7.1.70.0300.01015.08
7.1.60.0510.00717.02
7.1.50.0360.00917.06
7.1.40.0330.00817.01
7.1.30.0310.00817.04
7.1.20.0290.00817.01
7.1.10.0260.00815.06
7.1.00.0250.00815.00
7.0.330.0280.00914.82
7.0.320.0250.00814.81
7.0.310.0530.00814.69
7.0.300.0440.00814.67
7.0.290.0420.00814.73
7.0.280.0450.00714.68
7.0.270.0400.00814.71
7.0.260.0370.00714.73
7.0.250.0440.00714.77
7.0.240.0390.00814.83
7.0.230.0340.00914.82
7.0.220.0380.00914.82
7.0.210.0330.00914.83
7.0.200.0370.00614.72
7.0.190.0390.00814.72
7.0.180.0330.00814.72
7.0.170.0290.00914.74
7.0.160.0370.00814.71
7.0.150.0310.00714.70
7.0.140.0310.00914.73
7.0.130.0300.00714.76
7.0.120.0280.00914.73
7.0.110.0270.00714.74
7.0.100.0280.00814.75
7.0.90.0270.00914.72
7.0.80.0250.00914.66
7.0.70.0260.00914.69
7.0.60.0280.00814.72
7.0.50.0290.00914.70
7.0.40.0270.00814.85
7.0.30.0260.00914.85
7.0.20.0260.00914.80
7.0.10.0280.00614.83
7.0.00.0290.00714.77
5.6.400.0160.00915.74
5.6.390.0150.00915.63
5.6.380.0120.01015.33
5.6.370.0150.00915.35
5.6.360.0140.00915.37
5.6.350.0150.00915.27
5.6.340.0150.00815.31
5.6.330.0130.00915.31
5.6.320.0130.01015.31
5.6.310.0150.00915.29
5.6.300.0140.00915.31
5.6.290.0140.00815.31
5.6.280.0120.01015.33
5.6.270.0130.01015.34
5.6.260.0130.00915.37
5.6.250.0140.00915.34
5.6.240.0140.00815.40
5.6.230.0130.00915.29
5.6.220.0140.00915.32
5.6.210.0150.00815.34
5.6.200.0140.01015.37
5.6.190.0150.00815.35
5.6.180.0140.00915.33
5.6.170.0140.00915.34
5.6.160.0160.00715.29
5.6.150.0130.01015.37
5.6.140.0150.00815.37
5.6.130.0130.01015.37
5.6.120.0140.00915.35
5.6.110.0140.00815.37
5.6.100.0140.00915.32
5.6.90.0140.00915.29
5.6.80.0130.00915.26
5.6.70.0130.00915.33
5.6.60.0140.00915.26
5.6.50.0130.00915.21
5.6.40.0130.00915.28
5.6.30.0130.00915.27
5.6.20.0140.00815.28
5.6.10.0150.00915.26
5.6.00.0140.00815.25
5.5.380.0140.00814.38
5.5.370.0160.00814.37
5.5.360.0130.00914.36
5.5.350.0130.01014.33
5.5.340.0130.00814.37
5.5.330.0130.00814.35
5.5.320.0150.00814.38
5.5.310.0130.00914.35
5.5.300.0130.00814.35
5.5.290.0130.00914.37
5.5.280.0130.00814.35
5.5.270.0130.00914.33
5.5.260.0130.00814.32
5.5.250.0120.00914.30
5.5.240.0120.00914.28
5.5.230.0130.00814.32
5.5.220.0130.00914.27
5.5.210.0130.00814.35
5.5.200.0140.00614.25
5.5.190.0130.00814.32
5.5.180.0120.00914.30
5.5.170.0130.00914.71
5.5.160.0130.00814.25
5.5.150.0140.00714.35
5.5.140.0140.00714.27
5.5.130.0120.00914.25
5.5.120.0130.00714.26
5.5.110.0140.00714.25
5.5.100.0140.00714.30
5.5.90.0130.00914.25
5.5.80.0130.00814.26
5.5.70.0140.00714.35
5.5.60.0160.00714.33
5.5.50.0140.00914.27
5.5.40.0140.00814.29
5.5.30.0140.00714.31
5.5.20.0120.00914.32
5.5.10.0120.00814.30
5.5.00.0130.00814.24
5.4.450.0110.00612.19
5.4.440.0100.00712.23
5.4.430.0130.00512.22
5.4.420.0110.00612.21
5.4.410.0110.00612.23
5.4.400.0100.00712.17
5.4.390.0110.00612.18
5.4.380.0100.00612.18
5.4.370.0100.00712.14
5.4.360.0120.00612.11
5.4.350.0110.00712.16
5.4.340.0120.00612.15
5.4.330.0100.00712.18
5.4.320.0120.00612.16
5.4.310.0130.00512.14
5.4.300.0110.00712.16
5.4.290.0120.00612.17
5.4.280.0100.00712.18
5.4.270.0110.00612.15
5.4.260.0120.00612.12
5.4.250.0110.00612.14
5.4.240.0100.00712.16
5.4.230.0120.00512.14
5.4.220.0120.00612.12
5.4.210.0120.00612.13
5.4.200.0120.00512.11
5.4.190.0100.00712.10
5.4.180.0110.00712.12
5.4.170.0110.00712.16
5.4.160.0110.00712.08
5.4.150.0110.00612.14
5.4.140.0130.00512.13
5.4.130.0120.00612.20
5.4.120.0110.00612.17
5.4.110.0110.00612.21
5.4.100.0120.00612.19
5.4.90.0110.00612.14
5.4.80.0110.00612.18
5.4.70.0110.00612.19
5.4.60.0110.00612.19
5.4.50.0100.00812.18
5.4.40.0100.00612.15
5.4.30.0110.00612.18
5.4.20.0110.00612.21
5.4.10.0100.00712.17
5.4.00.0120.00712.13
5.3.290.0080.00617.57

preferences:
36.16 ms | 403 KiB | 5 Q