note 127939 added to function.is-callable

From: Date: Wed, 16 Nov 2022 08:42:48 +0000
Subject: note 127939 added to function.is-callable
Groups: php.notes 
Request: Send a blank email to php-notes+get-219893@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.224) ---- Manual Page -- https://php.net/manual/en/function.is-callable.php Edit -- https://main.php.net/note/edit/127939 Del: integrated -- https://main.php.net/note/delete/127939/integrated Del: useless -- https://main.php.net/note/delete/127939/useless Del: bad code -- https://main.php.net/note/delete/127939/bad+code Del: spam -- https://main.php.net/note/delete/127939/spam Del: non-english -- https://main.php.net/note/delete/127939/non-english Del: in docs -- https://main.php.net/note/delete/127939/in+docs Del: other reasons-- https://main.php.net/note/delete/127939 Reject -- https://main.php.net/note/reject/127939 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219893) next »