php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40051 Spotting references
Submitted: 2007-01-07 20:18 UTC Modified: -
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: BenBE at omorphia dot de Assigned:
Status: Open Package: Feature/Change Request
PHP Version: 5.2.0 OS: Windows 2K
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: BenBE at omorphia dot de
New email:
PHP Version: OS:

 

 [2007-01-07 20:18 UTC] BenBE at omorphia dot de
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC