From:             
Operating system: Linux CGI/FastCGI
PHP version:      5.3.8
Package:          Variables related
Bug Type:         Bug
Bug description:Strange Recursive/interation

Description:
------------
I wrote an OOP PHP class to interact with an Shipping estimate API.  I
setup a logging system to help log & track any issues during testing.

The goal was to have this logging system remove certain index keys for both
'objects' and 'arrays' in a recursive manor.

I believe that the passed-reference (variable using with an ampersand or
what I call a 'live link') is being 'pushed' up.

When I check the logged xml (in the example) it often read 'omitted'.  The
variable was being changed even though the original call to function wasn't
done using a passed-reference.

The function would work correctly with the corrected code or the log_xml
calls completed first.  Maybe using $v is what broke the pass reference and
it was just a 'copy' after that.

Test script:
---------------
Code Sample Here
http://pastebin.com/GcZMkD6B


-- 
Edit bug report at https://bugs.php.net/bug.php?id=60067&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60067&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60067&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60067&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60067&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60067&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60067&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60067&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60067&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60067&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60067&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60067&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60067&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60067&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60067&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60067&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60067&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60067&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60067&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60067&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60067&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60067&r=mysqlcfg

Reply via email to