FunctionFQNReplacer
FunctionFQNReplacer copied to clipboard
Does importing a global namespace for methods still work?
I can see why this
namespace App;
if (\is_string($s))
is supposed to work faster then this
namespace App;
if (is_string($s))
but I was wondering if, without changing your code much, one could import a function from global namespace like so
namespace App;
use function is_string;
if (is_string($s))
...and still benefit from improved performance?
Yes, that would still work and is the preferred approach: doctrine/coding-standard doea that for you (automatically), so if you want to suggest that instead of this package, please feel free to submit a patch to the README of this repository.