#25652 [Asn->Csd]: ZE2 Crashes in non-debug mode (CLI only)

From: Date: Wed, 31 Dec 2003 01:24:22 +0000
Subject: #25652 [Asn->Csd]: ZE2 Crashes in non-debug mode (CLI only)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52625@lists.php.net to get a copy of this message
ID: 25652 Updated by: sniper@php.net Reported By: john@php.net -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] derick@php.net Making it assigned so that Andi gets all mail about it. ------------------------------------------------------------------------ [2003-11-18 16:51:50] sniper@php.net Works with PHP 4 fine, not with PHP 5.. ------------------------------------------------------------------------ [2003-09-25 06:44:37] john@php.net 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] john@php.net 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

« previous php.bugs (#52625) next »