note 46233 added to functions.variable-functions
| From: | rxblowmeup at eml dot cc | Date: | Sun, 03 Oct 2004 22:39:08 +0000 |
| Subject: | note 46233 added to functions.variable-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77864@lists.php.net to get a copy of this message | ||
<?
class class_my{
function test_func($a){
echo $a;
}
}
$my = new class_my;
$obj_name = 'my';
$func_name = "test_func";
echo $$obj_name->{$func_name}("hello");//it worked!
if (function_exists($$obj_name->{$func_name})) { //but here it no work
echo "<br>func exists";
} else {
echo "<br>func not exists";
}
//function_exists return false...
//why?
?>
----
Manual Page -- http://www.php.net/manual/en/functions.variable-functions.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46233
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46233&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46233&report=yes
Search -- http://master.php.net/manage/user-notes.php