Skip to content

Commit c812b14

Browse files
authored
Merge pull request microsoft#157 from andwur/php72-count
Fix use of count() on a string value
2 parents 4f44e8e + bb15f00 commit c812b14

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)