ID: 25652 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Assigned +Status: Closed Bug Type: Zend Engine 2 problem Operating System: Redhat 8 PHP Version: 5CVS-2003-11-29 Assigned To: andi New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-12-08 07:46:37] [EMAIL PROTECTED] Making it assigned so that Andi gets all mail about it. ------------------------------------------------------------------------ [2003-11-18 16:51:50] [EMAIL PROTECTED] Works with PHP 4 fine, not with PHP 5.. ------------------------------------------------------------------------ [2003-09-25 06:44:37] [EMAIL PROTECTED] Opps. Bad code example -- this is the code: <?php function test($var) { echo "Test $var\n"; } class foo { var $arr = array("test"); function bar() { $this->arr[0]('testvalue'); } } $a = new foo(); $a->bar(); ?> ------------------------------------------------------------------------ [2003-09-25 06:29:07] [EMAIL PROTECTED] Description: ------------ ZE2 is bailing on with a fatal error when calling a method dyanmically using a properity of the class (an array) as the dynamic function name. I.e. $this->myarr[0]("function paramer"); returns: Fatal error: Method name must be a string in.... It worked in PHP4, so I don't know if this is intended as invalid in PHP5, or if it is a bug... Reproduce code: --------------- <?php class foo { var $arr = array("test"); function test($var) { echo "Test $var"; } } $a = new foo(); echo "<PRE>"; var_dump($a); echo "</PRE>"; $a->arr[0]("testvalue"); ?> Expected result: ---------------- Test testvalue Actual result: -------------- Fatal error: Method name must be a string in... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25652&edit=1