Doc #72477 [Opn->Csd]: Example #4 Complex callables invalid variable used

From: Date: Thu, 23 Jun 2016 11:49:18 +0000
Subject: Doc #72477 [Opn->Csd]: Example #4 Complex callables invalid variable used
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13594@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72477&edit=1 ID: 72477 Updated by: salathe@php.net Reported by: slawr at o2 dot pl Summary: Example #4 Complex callables invalid variable used -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: salathe Block user comment: N Private report: N New Comment: 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. Fixed in revision 339457: http://svn.php.net/viewvc?view=revision&revision=339457 Previous Comments: ------------------------------------------------------------------------ [2016-06-23 09:41:40] slawr at o2 dot pl Description: ------------ --- From manual page: http://www.php.net/functions.variable-functions --- in Example #4 Complex callables in part: ``` $func = array("Foo", "bar"); $func(); // prints "bar" $f = array(new Foo, "baz"); $func(); // prints "baz" $f = "Foo::bar"; $func(); // prints "bar" as of PHP 7.0.0; prior, it raised a fatal error ``` should be: ``` $func = array("Foo", "bar"); $func(); // prints "bar" $func = array(new Foo, "baz"); $func(); // prints "baz" $func = "Foo::bar"; $func(); // prints "bar" as of PHP 7.0.0; prior, it raised a fatal error ``` ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72477&edit=1

« previous php.doc.bugs (#13594) next »