- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
- Parse error: syntax error, unexpected '}' in /in/oid2v on line 28
Process exited with code 255.
<?php
$pattern = '[a-z\d+#.-]+'; // Borrowed from @Hamza.
$tags =<<<TAGS
gg!!gd
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 === ';' && $current !== $prevChar) {
$count++;
} else {
$count = 0;
break;
}
if (strpos($allowedChars, $current) === false) }
$count = 0;
break;
}
}
var_dump($count);
if (preg_match('/'.$pattern.'/', $tags)) {
var_dump(substr_count($tags, ';'));
}