3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '[a-z\d+#.-]+'; // Borrowed from @Hamza. $tags =<<<TAGS gggd hfhfghg;hfhdfh fgjfgjgf;hfhdfh;hfhdfh fgjgfj;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh;hfhdfh TAGS; $prevChar = ';'; $count = 0; $len = strlen($tags); $allowedChars = ';abcdefghijklmnopqrstuvwxyz0123456789#.-'; for ($i = 0; $i < $len; $i++) { $current = $tags[$i]; if ($current === ';') { $count++; continue; } if ($current === $prevChar) { $count = 0; break; } if (strpos($allowedChars, $current) === false) { $count = 0; break; } $prevChar = $current; } var_dump($count); if (preg_match('/'.$pattern.'/', $tags)) { var_dump(substr_count($tags, ';')); }
Output for git.master, git.master_jit, rfc.property-hooks
int(0) int(28)

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