ID: 30332 User updated by: justmanj at msu dot edu Reported By: justmanj at msu dot edu -Status: No Feedback +Status: Open Bug Type: Zend Engine 2 problem Operating System: winxp PHP Version: 5.0.2 Assigned To: andi New Comment:
tested with: PHP 5.1.0-dev (cli) (built: Apr 13 2005 08:33:33) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2004 Zend Technologies zend.ze1_compatibility_mode => On => On produces: C:\php5-win32-latest>php c:\web\ze1_test.php x Object ( [first] => im in the first ) x Object ( ) Array ( [0] => x Object ( [first] => im in the first ) ) which is not the design of php4 j Previous Comments: ------------------------------------------------------------------------ [2005-04-02 01:00:22] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-03-25 01:32:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2004-10-05 23:35:12] justmanj at msu dot edu Description: ------------ zend.ze1_compatibility_mode when turned on doesn't honor the same methodlogy as 4.x when passing a class for some parameters - it passes by reference in functions like array_push(); this behavior was not in 4.3.x, and the only workaround is the clone keyword, which should be added in the 4.3.x tree for backwards compatability. Reproduce code: --------------- <? class x { }; $first = new x; $second = $first; $container = array(); array_push($container, $first); $first->first = " im in the first"; print_r($first); print_r($second); print_r($container); Expected result: ---------------- x Object ( [first] => im in the first ) x Object ( ) Array ( [0] => x Object ( ) ) Actual result: -------------- x Object ( [first] => im in the first ) x Object ( ) Array ( [0] => x Object ( [first] => im in the first ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30332&edit=1