ID: 31205 Updated by: [EMAIL PROTECTED] Reported By: cjlars at users dot sourceforge dot net Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux 2.4.21 (only one tested) PHP Version: 4.3.10 New Comment:
Do not file bugs when you have Zend extensions (zend_extension=) loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache, APC, Xdebug and ionCube loader. These extensions often modify engine behavior which is not related to PHP itself. Also, search the bug database first before filing a bug! And this Zend extension thing is marked in read on the "report" page, should we make it a h1 and blinking perhaps? Previous Comments: ------------------------------------------------------------------------ [2004-12-20 17:33:30] [EMAIL PROTECTED] Do not file bugs when you have Zend extensions (zend_extension=) loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache, APC, Xdebug and ionCube loader. These extensions often modify engine behavior which is not related to PHP itself. ------------------------------------------------------------------------ [2004-12-20 17:02:03] cjlars at users dot sourceforge dot net Description: ------------ The below code should obviously return "aaaaaaa". With PHP 4.3.10 is returns nothing. It does return the expected result if I use: foreach ($arr_test as $key => $objtest) I think in the code below $objtest is an array instead of being an onject. This is critical and it affects lots of existing code (I've seen NuSOAP affected for example) Reproduce code: --------------- <?php class test_class { var $test; } $arr_test = array(); $obj = new test_class(); $obj->test = "aaaaaa"; $arr_test[] = $obj; foreach ($arr_test as $objtest) echo $objtest->test; ?> Expected result: ---------------- aaaaaa Actual result: -------------- Nothing ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31205&edit=1