slevomat / coding-standard

Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs
MIT License
1.39k stars 173 forks source link

sprintf() is now optimized by the compiler #1697

Open arokettu opened 3 weeks ago

arokettu commented 3 weeks ago

See: https://github.com/php/php-src/pull/14546

Therefore is should be added to FunctionHelper::SPECIAL_FUNCTIONS

bkdotcom commented 2 weeks ago

has sprintf's function signature changed? Is it now a language construct (like empty()) vs a function?

what makes it "special" ?

arokettu commented 2 weeks ago

@bkdotcom FunctionHelper::SPECIAL_FUNCTIONS is used by SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions to indicate functions that can be optimized by compiler when fully qualified, at least that's what the code tells me