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 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: 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: Mon Dec 09 23:01:24 2019 UTC