note 102950 added to function.is-callable
| From: | V dot Suhanov at osu1 dot php dot net | Date: | Wed, 16 Mar 2011 14:11:29 +0000 |
| Subject: | note 102950 added to function.is-callable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177929@lists.php.net to get a copy of this message | ||
is_callable("{$class}::{$method}"); will return false if method is not defined as static
in PHP 5.2 and will return true in PHP 5.3
<?php
class foo {
public function bar(){}
}
var_dump(is_callable("foo::bar")); // true in 5.3, but false in 5.2
?>
----
Server IP: 69.147.83.197
Probable Submitter: 89.191.121.119
----
Manual Page -- http://www.php.net/manual/en/function.is-callable.php
Edit -- https://master.php.net/note/edit/102950
Del: integrated -- https://master.php.net/note/delete/102950/integrated
Del: useless -- https://master.php.net/note/delete/102950/useless
Del: bad code -- https://master.php.net/note/delete/102950/bad+code
Del: spam -- https://master.php.net/note/delete/102950/spam
Del: non-english -- https://master.php.net/note/delete/102950/non-english
Del: in docs -- https://master.php.net/note/delete/102950/in+docs
Del: other reasons-- https://master.php.net/note/delete/102950
Reject -- https://master.php.net/note/reject/102950
Search -- https://master.php.net/manage/user-notes.php