note 34084 added to function.call-user-func
| From: | greg at chiaraquartet dot net | Date: | Tue, 15 Jul 2003 22:41:17 +0000 |
| Subject: | note 34084 added to function.call-user-func | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52155@lists.php.net to get a copy of this message | ||
call_user_func can also be used to call a static class method.
<?php
class my {
function method($additional)
{
echo "called method: $additional\n";
}
}
call_user_func(array("my", "method"), "hello");
?>
outputs "called method: hello"
----
Manual Page -- http://www.php.net/manual/en/function.call-user-func.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34084
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34084&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34084&report=yes