Doc #68436 [Opn->Nab]: Ambiguous PHP versions stated in description
| From: | salathe@php.net | Date: | Mon, 17 Nov 2014 16:13:09 +0000 |
| Subject: | Doc #68436 [Opn->Nab]: Ambiguous PHP versions stated in description | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11644@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68436&edit=1
ID: 68436
Updated by: salathe@php.net
Reported by: pjanko at gmail dot com
Summary: Ambiguous PHP versions stated in description
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
The comments are correct, both of those lines of code will work as of PHP 5.3.0. The second line
uses the array($class, $method) style but uses the namespace feature so requires PHP 5.3.0 or
higher.
Previous Comments:
------------------------------------------------------------------------
[2014-11-17 16:03:02] pjanko at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.call-user-func-array
---
Example #2 call_user_func_array() using namespace name
(...)
// As of PHP 5.3.0
call_user_func_array(__NAMESPACE__ .'\Foo::test', array('Hannes'));
// As of PHP 5.3.0
call_user_func_array(array(__NAMESPACE__ .'\Foo', 'test'),
array('Philip'));
Expected result:
----------------
// As of PHP < 5.3.0
call_user_func_array(array(__NAMESPACE__ .'\Foo', 'test'),
array('Philip'));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68436&edit=1