3v4l.org

run code in 300+ PHP versions simultaneously
<?php function loadZoneDefintion() { // initial stuff $i = 1; $limit = 9; $array = array("A","B","C","D","E","F","G","H","I","J","K","L"); // foreach xml file/zone definition foreach ($array as $value) { // if counter is less than limit if ($i < $limit) { // foreach loops // process curl request echo "Counter: " . $i . ", Value: " . $value . " | "; // increment counter $i++; } // if counter has reached the limit else { echo "[PAUSE]"; $now = time(); $nowText = date("g:h:s", $now); $future = strtotime("+5 minutes", $now); $futureText = date("g:h:s", $future); echo "Now: " . $nowText; echo "Future: " . $futureText; // pause script due to rate limit //sleep(10); //time_sleep_until(); // reset counter $i = 1; echo "[RESET]"; } } } loadZoneDefintion();

preferences:
35.52 ms | 402 KiB | 5 Q