note 127937 added to function.is-callable
| From: | Anonymous at main dot php dot net | Date: | Wed, 16 Nov 2022 08:39:45 +0000 |
| Subject: | note 127937 added to function.is-callable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219891@lists.php.net to get a copy of this message | ||
The syntax_only parameter doesn't work as described. If the value to check contains a class
name, is_callable() always returns TRUE, even if the class doesn't implement the __call() magic
method.
<?php
class C {}
var_dump(is_callable("C")); // bool(true)
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.161 (proxied: 178.13.10.225)
----
Manual Page -- https://php.net/manual/en/function.is-callable.php
Edit -- https://main.php.net/note/edit/127937
Del: integrated -- https://main.php.net/note/delete/127937/integrated
Del: useless -- https://main.php.net/note/delete/127937/useless
Del: bad code -- https://main.php.net/note/delete/127937/bad+code
Del: spam -- https://main.php.net/note/delete/127937/spam
Del: non-english -- https://main.php.net/note/delete/127937/non-english
Del: in docs -- https://main.php.net/note/delete/127937/in+docs
Del: other reasons-- https://main.php.net/note/delete/127937
Reject -- https://main.php.net/note/reject/127937
Search -- https://main.php.net/manage/user-notes.php