note 30272 added to function.func-get-args

From: Date: Wed, 12 Mar 2003 18:27:04 +0000
Subject: note 30272 added to function.func-get-args
Groups: php.notes 
Request: Send a blank email to php-notes+get-45164@lists.php.net to get a copy of this message
Apparently PHP won't let you pass func_get_args() as a paramater to another function, such as call_user_func_array(). Not sure why, but I guess it doesn't hurt *too* much to just assign its value to a variable. By the way, using this and other functions, lets you get one step closer to making easy function macros: function my_printf() { $args = func_get_args(); return call_user_func_array('printf', $args); } Now you can call my_printf() just as if it were printf() itself. -- http://www.php.net/manual/en/function.func-get-args.php http://master.php.net/manage/user-notes.php?action=edit+30272 http://master.php.net/manage/user-notes.php?action=delete+30272 http://master.php.net/manage/user-notes.php?action=reject+30272

« previous php.notes (#45164) next »