note 127938 added to function.is-callable

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

« previous php.notes (#219892) next »