3v4l.org

run code in 300+ PHP versions simultaneously
<?php $delivery = array( 'next' => 1, 'max' => 2, 'exclude' => array(6 => "Samstag", 7 => "Sonntag"), 'afterhour' => 14, 'message' => "Lieferung bis %tomorrow% (%tomorrow_date_full%) oder %dayaftertomorrow% (%dayaftertomorrow_date_full%)", 'translate' => array('tomorrow' => 'morgen', 'dayaftertomorrow' => 'übermorgen'), 'date' => date("d.m.Y")); function checkWeekend($delivery) { $wochentage = array( 1=>"Montag", 2=>"Dienstag", 3=>"Mittwoch", 4=>"Donnerstag", 5=>"Freitag", 6=>"Samstag", 7=>"Sonntag"); $currentDay = (int) date('N'); $found = []; while(count($found) < 2) { $currentDay = $currentDay + 1; if($currentDay > 7) { $currentDay = 1; } if(!isset($delivery['exclude'][$currentDay])) { $found[] = $wochentage[$currentDay]; } } return $found; } var_dump(checkWeekend($delivery)); ?>

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.01116.63
8.3.50.0140.00016.25
8.3.40.0110.00718.96
8.3.30.0040.01419.01
8.3.20.0040.00421.95
8.3.10.0080.00021.75
8.3.00.0040.00418.34
8.2.180.0060.01025.92
8.2.170.0160.00022.96
8.2.160.0100.00321.14
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00020.25
8.2.120.0040.00426.35
8.2.110.0060.00321.04
8.2.100.0030.00918.03
8.2.90.0000.00819.86
8.2.80.0090.00020.54
8.2.70.0050.00517.75
8.2.60.0060.00318.16
8.2.50.0050.00318.10
8.2.40.0040.00420.23
8.2.30.0040.00421.10
8.2.20.0040.00418.27
8.2.10.0080.00018.29
8.2.00.0000.00718.25
8.1.280.0070.00725.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.18
8.1.230.0080.00322.81
8.1.220.0000.00817.91
8.1.210.0000.00919.04
8.1.200.0060.00317.47
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0050.00318.71
8.1.160.0070.00019.00
8.1.150.0060.00320.27
8.1.140.0040.00419.65
8.1.130.0070.00019.00
8.1.120.0050.00317.57
8.1.110.0030.00517.64
8.1.100.0070.00017.54
8.1.90.0000.00717.54
8.1.80.0000.00717.52
8.1.70.0030.00317.57
8.1.60.0050.00217.63
8.1.50.0000.00717.59
8.1.40.0040.00417.48
8.1.30.0100.00017.70
8.1.20.0080.00017.68
8.1.10.0000.00817.59
8.1.00.0040.00417.54
8.0.300.0000.00720.10
8.0.290.0000.00716.88
8.0.280.0000.00818.54
8.0.270.0000.00717.26
8.0.260.0000.00817.01
8.0.250.0000.00717.09
8.0.240.0040.00417.04
8.0.230.0040.00417.16
8.0.220.0040.00417.05
8.0.210.0060.00017.04
8.0.200.0060.00017.11
8.0.190.0050.00317.11
8.0.180.0000.00717.06
8.0.170.0000.00716.94
8.0.160.0000.00717.07
8.0.150.0090.00017.06
8.0.140.0000.00717.02
8.0.130.0060.00013.46
8.0.120.0000.00717.01
8.0.110.0000.00816.99
8.0.100.0000.00716.83
8.0.90.0070.00016.97
8.0.80.0090.00616.95
8.0.70.0000.00817.03
8.0.60.0000.00716.88
8.0.50.0000.00716.88
8.0.30.0070.01117.15
8.0.20.0120.00717.40
8.0.10.0000.00717.11
8.0.00.0130.00416.87
7.4.330.0000.00515.55
7.4.320.0060.00016.66
7.4.300.0000.00716.67
7.4.290.0040.00416.71
7.4.280.0000.00816.51
7.4.270.0030.00316.69
7.4.260.0000.00716.57
7.4.250.0000.00816.64
7.4.240.0030.00416.69
7.4.230.0000.00716.49
7.4.220.0180.00516.50
7.4.210.0110.00316.71
7.4.200.0050.00316.48
7.4.160.0040.01216.56
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0140.00916.46
7.4.120.0080.01216.67
7.4.110.0000.02116.60
7.4.100.0030.01516.55
7.4.90.0070.01016.50
7.4.80.0100.00619.39
7.4.70.0100.00716.52
7.4.60.0080.00816.64
7.4.50.0070.01416.78
7.4.40.0160.00016.60
7.4.30.0150.00316.71
7.4.00.0040.01214.92
7.3.330.0030.00313.41
7.3.320.0050.00013.40
7.3.310.0000.00716.45
7.3.300.0070.00016.49
7.3.290.0100.00716.44
7.3.280.0090.00916.45
7.3.270.0080.00817.40
7.3.260.0030.01416.66
7.3.250.0110.00716.50
7.3.240.0090.00916.66
7.3.230.0110.00816.58
7.3.210.0030.01316.58
7.3.200.0060.01216.54
7.3.190.0060.00916.56
7.3.180.0120.00916.66
7.3.170.0090.01016.69
7.3.160.0130.00316.58
7.3.10.0110.00716.83
7.3.00.0030.01016.93
7.2.330.0030.01716.75
7.2.320.0060.01016.75
7.2.310.0040.01316.95
7.2.300.0170.00716.63
7.2.290.0070.01016.89
7.2.130.0120.00316.62
7.2.120.0090.00915.80
7.2.110.0540.01015.86
7.2.100.0590.00815.79
7.2.90.0730.00815.94
7.2.80.0730.01115.78
7.2.70.0380.00316.10
7.2.60.0210.01116.19
7.2.50.0400.00615.96
7.2.40.0120.01116.03
7.2.30.0150.00815.91
7.2.20.0470.01015.83
7.2.10.0500.01015.91
7.2.00.0410.01116.06
7.1.250.0100.00715.69
7.1.240.0070.00714.01
7.1.230.0650.00614.16
7.1.220.0160.00013.86
7.1.210.1110.01614.06
7.1.200.0380.00614.83
7.1.190.0610.01013.85
7.1.180.0620.00013.77
7.1.170.0470.01013.68
7.1.160.0170.00613.77
7.1.150.0700.01013.86
7.1.140.0760.00613.50
7.1.130.1400.01013.97
7.1.120.0930.00013.68
7.1.110.0900.01013.66
7.1.100.0580.01013.52
7.1.90.0680.00313.86
7.1.80.1160.00613.82
7.1.70.0530.01015.53
7.1.60.1460.01223.61
7.1.50.0500.00823.65
7.1.40.0630.01823.45
7.1.30.0620.00523.30
7.1.20.0990.00723.37
7.1.10.0420.00514.50
7.1.00.0460.00814.43
7.0.320.1380.00713.55
7.0.310.0710.00313.75
7.0.300.1840.00713.68
7.0.290.0900.00613.67
7.0.280.1110.00713.70
7.0.270.0530.01813.54
7.0.260.0730.00913.57
7.0.250.0510.01413.81
7.0.240.0800.00413.46
7.0.230.1200.00713.60
7.0.220.0910.00013.82
7.0.210.0780.01513.82
7.0.200.0650.00614.36
7.0.190.0680.00514.30
7.0.180.0640.00314.18
7.0.170.0570.00914.06
7.0.160.0590.00814.26
7.0.150.0590.00814.21
7.0.140.0450.01214.14
7.0.130.0620.01014.26
7.0.120.0490.01014.05
7.0.110.0440.00814.00
7.0.100.0500.00514.18
7.0.90.0550.01014.13
7.0.80.0530.00914.26
7.0.70.0390.01114.11
7.0.60.0540.01114.00
7.0.50.0450.00614.31
7.0.40.0540.00914.34
7.0.30.0540.00814.31
7.0.20.0570.00714.25
7.0.10.0510.00714.20
7.0.00.0480.01414.26
5.6.380.0090.00614.18

preferences:
58.72 ms | 401 KiB | 5 Q