note 81397 added to function.func-get-args
| From: | n dot b at naden dot de | Date: | Tue, 26 Feb 2008 13:08:40 +0000 |
| Subject: | note 81397 added to function.func-get-args | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136496@lists.php.net to get a copy of this message | ||
To use the result of func_get_args() directly as a function parameter, you can do a simple cast.
<?php
function bar($params)
{
print_r( $params );
}
function foo()
{
/// cast to array
bar((array)func_get_args());
}
foo(1, 2, 3);
?>
naden
http://www.naden.de/blog
----
Server IP: 212.124.37.9
Probable Submitter: 87.162.92.230
----
Manual Page -- http://www.php.net/manual/en/function.func-get-args.php
Edit -- https://master.php.net/note/edit/81397
Del: integrated -- https://master.php.net/note/delete/81397/integrated
Del: useless -- https://master.php.net/note/delete/81397/useless
Del: bad code -- https://master.php.net/note/delete/81397/bad+code
Del: spam -- https://master.php.net/note/delete/81397/spam
Del: non-english -- https://master.php.net/note/delete/81397/non-english
Del: in docs -- https://master.php.net/note/delete/81397/in+docs
Del: other reasons-- https://master.php.net/note/delete/81397
Reject -- https://master.php.net/note/reject/81397
Search -- https://master.php.net/manage/user-notes.php