From:             BenBE at omorphia dot de
Operating system: Windows 2K
PHP version:      5.2.0
PHP Bug Type:     Feature/Change Request
Bug description:  Spotting references

Description:
------------
When trying to serialize a variable by hand you need a way to find out, if
this variable contains references between two fields or circular references
(recursion). Currently there's no way to do this without doing crappy tests
(modifying the variables in questions and check for changes being reflected
in the other one).

Reproduce code:
---------------
About 50 LOC (See my comment on Spotting References at
http://php.net/manual/en/language.references.spot.php)

Expected result:
----------------
//Using internal functionality ;-)
$a = is_ref($var1, $var2);

Actual result:
--------------
Slow reference testing due to much overhead by not being supported by the
PHP internals ... internally this would be about 10 LOC IMHO.

-- 
Edit bug report at http://bugs.php.net/?id=40051&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40051&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40051&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40051&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40051&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40051&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40051&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40051&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40051&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40051&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40051&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40051&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40051&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40051&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40051&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40051&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40051&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40051&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40051&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40051&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40051&r=mysqlcfg

Reply via email to