php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33985 variable corruption in nested functions using extract()
Submitted: 2005-08-03 20:53 UTC Modified: 2005-08-04 09:06 UTC
From: mdpm2 at rohms dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.4.0 OS: FreeBSD 4.5
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mdpm2 at rohms dot com
New email:
PHP Version: OS:

 

 [2005-08-03 20:53 UTC] mdpm2 at rohms dot com
Description:
------------
This problem was introduced after PHP 4.3.6 (last known version where it wasn't reproducable) and is still present in 4.4.0

Functions are unable to reference passed variables if they are called within a parent function that executes:
  extract($GLOBALS,EXTR_REFS);

Prior to 4.4.0, referenced vars and globals would contain random other variable values; as of 4.4.0 they're NULL or 0.

I'm trying to develop some code to isolate the problem but my error appears within a function that is recursive, but even the first iteration of the function does not receive the variable values passed as arguments.  I have to assume this may be some issue with the way the compiler/optimizer handles the code during compilation.





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-04 09:06 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

One report is enough..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC