php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29967 call_user_func_array can't be used as function parameter
Submitted: 2004-09-03 10:31 UTC Modified: 2004-09-10 16:49 UTC
From: mfischer@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.1 OS:
Private report: No CVE-ID: None
 [2004-09-03 10:31 UTC] mfischer@php.net
Description:
------------
It should be mentioned on the documentation page that func_get_args() can't be used as a function parameter directly, e.g.:

$ret = call_user_func_array('mysql_connect', func_get_args());



Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-03 10:35 UTC] mfischer@php.net
I forgot: it would be nice to know why this doesn't work, e.g. whats the rational behind it. Thanks
 [2004-09-10 16:49 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Added to func_get_args, func_get_arg, func_num_args:

"This function can not be used directly as a function parameter. You have to assign the result to a variable and pass that variable instead."

I'm not sure why it's not possible. If you insist on telling this in the documentation, ask at internals and reopen this bug ;-).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Aug 07 15:01:28 2024 UTC