php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49565 same arrays (with recursion) comparison don't result "equals"
Submitted: 2009-09-15 20:51 UTC Modified: 2009-09-16 07:33 UTC
From: pierb1971 at yahoo dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.3.0 OS: windows vista
Private report: No CVE-ID: None
 [2009-09-15 20:51 UTC] pierb1971 at yahoo dot com
Description:
------------
When comparing (with "===") a reference of an array (which as recursion 
inside) with the original array itself, the result is not "equal" value 
but display recursion error

Reproduce code:
---------------
$z =& $GLOBALS;
if ($z === $GLOBALS) {
	print 'Equals';
} else {
	print 'Not equals';
}

Expected result:
----------------
Equals

Actual result:
--------------
Fatal error: Nesting level too deep - recursive dependency? in <file 
name> on line <line number>
Fatal error: Nesting level too deep - recursive dependency? in Unknown 
on line 0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-16 07:33 UTC] jani@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 22:01:33 2024 UTC