Phpinspectionsea: Unqualified function reference for function as string?

Created on 6 Mar 2018  路  5Comments  路  Source: kalessil/phpinspectionsea

On

  array_filter($functions, 'function_exists');

the plugin suggests I use '\function_exists' instead.
Probably not a good idea :)

question

Most helpful comment

Why =)

All 5 comments

Why =)

Why shouldn't this be a good idea? PHP's OPCode-Cache is able to optimize this if you use the root-namespaced version.

ah, backslash in string is ok?

Actually it should works fine even for strings: https://ideone.com/xBfr7D

You be right. I stand corrected. https://3v4l.org/JsnXA

Was this page helpful?
0 / 5 - 0 ratings