Re: is_callable and function_exists with disable_functions
| From: | Remi Collet | Date: | Thu, 26 Mar 2015 15:32:25 +0000 |
| Subject: | Re: is_callable and function_exists with disable_functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85475@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 26/03/2015 16:21, Xinchen Hui a écrit :
> Hey Internal:
>
> there is one confused behavior with disable_functions:
>
> $ sapi/cli/php -n -d disable_functions=strlen -r
> 'var_dump(function_exists("strlen"));
> var_dump(is_callable("strlen"));' bool(false) bool(true)
>
> as you can see, strlen is disabled by disable_functions.
>
> function_exisis tell it is not exists but is_callable said it is
> callable..
>
> do you mind if I change the current behavior of is_callable , to
> return false on this case?
Make sense
> or, at least, change function_exists's behavior instead?
Seems a bad idea.
Remi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlUUJokACgkQYUppBSnxahh+twCgs0dJR8Vt1Tj0VK/9kD0llrp0
OIsAn0uw9zd8fSY5mjbvEkTeh0Ehu2Zs
=Ue6n
-----END PGP SIGNATURE-----