diff --git a/src/Psalm/Internal/Type/TypeParser.php b/src/Psalm/Internal/Type/TypeParser.php index 214d89df94b..cce99c5e0f0 100644 --- a/src/Psalm/Internal/Type/TypeParser.php +++ b/src/Psalm/Internal/Type/TypeParser.php @@ -90,7 +90,6 @@ use function preg_match; use function preg_replace; use function reset; -use function str_starts_with; use function stripslashes; use function strlen; use function strpos; @@ -1472,7 +1471,7 @@ private static function getTypeFromKeyedArrayTree( return new TObjectWithProperties($properties, [], [], $from_docblock); } - $callable = str_starts_with($type, 'callable-'); + $callable = strpos($type, 'callable-') === 0; $class = TKeyedArray::class; if ($callable) { $class = TCallableKeyedArray::class;