Doc #54130 [NEW]: call_user_func description is too general
| From: | ajrattink at correct dot net | Date: | Tue, 01 Mar 2011 16:03:58 +0000 |
| Subject: | Doc #54130 [NEW]: call_user_func description is too general | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-6041@lists.php.net to get a copy of this message | ||
From:
Operating system:
PHP version: 5.3.5
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:call_user_func description is too general
Description:
------------
---
From manual page: http://www.php.net/function.call-user-func#Parameters
---
The manual states that call_user_func(array($classname, $methname), ...)
will call the static method of the class indicated by +classname+ but fails
to mention that it does not work if the class is imported in a namespace.
To avoid disappointed programmers, I think it should.
Example:
use X as Y;
call_user_func(array('Y', 'f'), ...)
will not work. This means that if the original class caused a nameconflict
there is absolutely no way of calling it. Ever.
--
Edit bug report at http://bugs.php.net/bug.php?id=54130&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54130&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54130&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54130&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54130&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54130&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54130&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54130&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54130&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54130&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54130&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54130&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54130&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54130&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54130&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54130&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54130&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54130&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54130&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54130&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54130&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54130&r=mysqlcfg