Skip to content

Commit bb15f00

Browse files
committed
Fix use of count() on a string value
This is no longer allowed in PHP 7.2, and is typically unwanted. See https://wiki.php.net/rfc/counting_non_countables
1 parent 4f44e8e commit bb15f00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpTokenizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function getTokensArrayFromContent(
7575
$pos += $strlen;
7676

7777
if ($parseContext !== null && !$passedPrefix) {
78-
$passedPrefix = \count($prefix) < $pos;
78+
$passedPrefix = \strlen($prefix) < $pos;
7979
if ($passedPrefix) {
8080
$fullStart = $start = $pos = $initialPos;
8181
}

0 commit comments

Comments
 (0)