3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 1; // Start $y = 10; // Iterations Needed $days = []; //Empty Array while($x <= $y) { // Set Buffer $buffer = 2 + $x; // Get Date with Buffer $date = date(strtotime("+$buffer days")); // If the day is a weeday if(date('N', $date) < 6){ // Add to array $days[$date] = date("l, jS M", $date); // If not, increase max iteration (example: 10 to 11) }else{ $y++; } // Go to next loop $x++; } echo "<pre>"; print_r($days);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [1548283819] => Wednesday, 23rd Jan [1548370219] => Thursday, 24th Jan [1548456619] => Friday, 25th Jan [1548715819] => Monday, 28th Jan [1548802219] => Tuesday, 29th Jan [1548888619] => Wednesday, 30th Jan [1548975019] => Thursday, 31st Jan [1549061419] => Friday, 1st Feb [1549320619] => Monday, 4th Feb [1549407019] => Tuesday, 5th Feb )

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:
31.92 ms | 402 KiB | 8 Q