note 127936 added to function.is-callable
| From: | Anonymous at main dot php dot net | Date: | Wed, 16 Nov 2022 08:39:44 +0000 |
| Subject: | note 127936 added to function.is-callable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219890@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/127936
Del: integrated -- https://main.php.net/note/delete/127936/integrated
Del: useless -- https://main.php.net/note/delete/127936/useless
Del: bad code -- https://main.php.net/note/delete/127936/bad+code
Del: spam -- https://main.php.net/note/delete/127936/spam
Del: non-english -- https://main.php.net/note/delete/127936/non-english
Del: in docs -- https://main.php.net/note/delete/127936/in+docs
Del: other reasons-- https://main.php.net/note/delete/127936
Reject -- https://main.php.net/note/reject/127936
Search -- https://main.php.net/manage/user-notes.php