#33243 [NEW]: ze1_compatibility_mode does not work as expected
| From: | ladislav dot prosek at matfyz dot cz | Date: | Sat, 04 Jun 2005 18:12:45 +0000 |
| Subject: | #33243 [NEW]: ze1_compatibility_mode does not work as expected | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-79897@lists.php.net to get a copy of this message | ||
From: ladislav dot prosek at matfyz dot cz
Operating system: Windows XP SP2
PHP version: 5.0.4
PHP Bug Type: Zend Engine 2 problem
Bug description: ze1_compatibility_mode does not work as expected
Description:
------------
When zend.ze1_compatibility_mode is On, object copying is not compliant to
PHP4. Namely, objects are not deep-copied on assignment. This may cause
substantial problems to legacy applications that rely on the compatibility
mode.
Reproduce code:
---------------
$a->y->z = 0;
$b = $a; // should perform deep copy of $a
$b->y->z = 1; // hence this should have no effect on $a
var_dump($a);
Expected result:
----------------
object(stdClass)#1 (1) {
["y"]=>
object(stdClass)#2 (1) {
["z"]=>
int(0) // <--
}
}
Actual result:
--------------
object(stdClass)#1 (1) {
["y"]=>
object(stdClass)#2 (1) {
["z"]=>
int(1) // because $a->y and $b->y are still one object after the
assignment
}
}
--
Edit bug report at http://bugs.php.net/?id=33243&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33243&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33243&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33243&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33243&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33243&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33243&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33243&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33243&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33243&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33243&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33243&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33243&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33243&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33243&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33243&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33243&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33243&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33243&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33243&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33243&r=mysqlcfg