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(isset($delivery['exclude'][$currentDay])) { $found[] = $wochentage[$currentDay]; } } var_dump($found); } checkWeekend($delivery); ?>
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> string(7) "Samstag" [1]=> string(7) "Sonntag" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.17 ms | 401 KiB | 8 Q