note 77300 added to function.call-user-func
| From: | sergebelychev at osu1 dot php dot net | Date: | Thu, 23 Aug 2007 14:08:14 +0000 |
| Subject: | note 77300 added to function.call-user-func | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129731@lists.php.net to get a copy of this message | ||
For calling a class method from version 5.2.3 you can write
<?php
class myclass {
static function say_hello()
{
echo "Hello!\n";
}
}
$classname = "myclass";
call_user_func('myclass::say_hello');
?>
----
Server IP: 195.54.192.44
Probable Submitter: 212.92.161.182 (proxied: 212.92.148.159)
----
Manual Page -- http://www.php.net/manual/en/function.call-user-func.php
Edit -- https://master.php.net/note/edit/77300
Del: integrated -- https://master.php.net/note/delete/77300/integrated
Del: useless -- https://master.php.net/note/delete/77300/useless
Del: bad code -- https://master.php.net/note/delete/77300/bad+code
Del: spam -- https://master.php.net/note/delete/77300/spam
Del: non-english -- https://master.php.net/note/delete/77300/non-english
Del: in docs -- https://master.php.net/note/delete/77300/in+docs
Del: other reasons-- https://master.php.net/note/delete/77300
Reject -- https://master.php.net/note/reject/77300
Search -- https://master.php.net/manage/user-notes.php