Bug #69194 [NEW]: Variable variables using an array to call a method broken
| From: | donatj at gmail dot com | Date: | Thu, 05 Mar 2015 17:33:00 +0000 |
| Subject: | Bug #69194 [NEW]: Variable variables using an array to call a method broken | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-191195@lists.php.net to get a copy of this message | ||
From: donatj at gmail dot com
Operating system: Irrelevant
PHP version: master-Git-2015-03-05 (Git)
Package: Variables related
Bug Type: Bug
Bug description:Variable variables using an array to call a method broken
Description:
------------
http://3v4l.org/3NKUS
The problem is illustrated here. It is causing a number of my tests to
fail in 7 using build 20150201.
Test script:
---------------
<?php
class Foo {
function bar(){
echo "Futbal";
}
}
$baz = new Foo;
$qux = array("quux" => "bar");
$baz->$qux["quux"]();
Expected result:
----------------
"Futbal"
Actual result:
--------------
Notice: Array to string conversion in /in/3NKUS on line 13
Notice: Undefined property: Foo::$Array in /in/3NKUS on line 13
Fatal error: Function name must be a string in /in/3NKUS on line 13
Process exited with code 255.
--
Edit bug report at https://bugs.php.net/bug.php?id=69194&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69194&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69194&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69194&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69194&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69194&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69194&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69194&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69194&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69194&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69194&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69194&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69194&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69194&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69194&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69194&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69194&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69194&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69194&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69194&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69194&r=mysqlcfg