3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($input, $length = 4) { $sequence = "abcdefghijklmnopqrstuvwxyz"; $sequence .= substr($sequence, 0, $length - 1); // abcdefghijklmnopqrstuvwxyz is converted to abcdefghijklmnopqrstuvwxyzabc for ($i = 0; $i < strlen($sequence) - $length; $i++) { // loop runs for $i = 0...25 if (strpos($input, substr($sequence, $i, $length)) !== false) { echo sprintf('"%s" contains "%s"' . "\n", $input, substr($sequence, $i, $length)); return true; } } echo sprintf('"%s" is OK' . "\n", $input); return false; } check("youlookgreatbcdetoday"); // "youlookgreatbcdetoday" contains "bcde" check("youlookgreatklmtoday"); // "youlookgreatklmtoday" is OK check("youlookgreattoday"); // "youlookgreattoday" is OK check("youlookgreattodayza"); // "youlookgreattodayza" is OK check("youlookgreattodayzab"); // "youlookgreattodayzab" contains "yzab"
Output for git.master, git.master_jit, rfc.property-hooks
"youlookgreatbcdetoday" contains "bcde" "youlookgreatklmtoday" is OK "youlookgreattoday" is OK "youlookgreattodayza" is OK "youlookgreattodayzab" contains "yzab"

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:
84.11 ms | 401 KiB | 8 Q