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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 15 11:01:25 2019 UTC