From bb15f0051a924b8d412710eda9977d063998da99 Mon Sep 17 00:00:00 2001 From: Andrew Watts Date: Mon, 19 Jun 2017 12:10:21 +0930 Subject: [PATCH] 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 --- src/PhpTokenizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpTokenizer.php b/src/PhpTokenizer.php index 26f8d203..ef4f9d32 100644 --- a/src/PhpTokenizer.php +++ b/src/PhpTokenizer.php @@ -75,7 +75,7 @@ public static function getTokensArrayFromContent( $pos += $strlen; if ($parseContext !== null && !$passedPrefix) { - $passedPrefix = \count($prefix) < $pos; + $passedPrefix = \strlen($prefix) < $pos; if ($passedPrefix) { $fullStart = $start = $pos = $initialPos; }