If a string parameter is type-hinted as \string, editors and code analysis tools may think that you're meaning to use a class named string from the global namespace. This causes issues when an actual string is passed to the method, leading to errors like "foo is of type string, but the function expects a object" in Scrutinizer.
If a" in Scrutinizer.
string
parameter is type-hinted as\string
, editors and code analysis tools may think that you're meaning to use a class namedstring
from the global namespace. This causes issues when an actual string is passed to the method, leading to errors like "foo is of type string, but the function expects a object