|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-10-07 03:35 UTC] sixd@php.net
[2014-10-07 04:25 UTC] pegasus at vaultwiki dot org
[2014-10-07 12:50 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2014-10-07 12:50 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 19:00:01 2025 UTC |
Description: ------------ Assuming an object scope, where $info['callback'] = 'callbackMethod' and 'callbackMethod' is a method on $this object. The following code works under 5.6.0: #### $out = $this->$info['callback']($data); #### But in Master it throws a fatal error (Function name must be a string). Changing it to the following and it again works as expected: #### $out = $this->{$info['callback']}($data); #### Unfortunately this code is from another vendor, so I cannot expect them to change this although using curly braces may be better practice in general to specify the proper evaluation order. Expected result: ---------------- No fatal error.