php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32126 Apache crashes when calling a function declared in a "case" and with global var
Submitted: 2005-02-27 12:11 UTC Modified: 2005-02-27 12:26 UTC
From: ennixo at free dot fr Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.0.2 OS: Windows XP
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: ennixo at free dot fr
New email:
PHP Version: OS:

 

 [2005-02-27 12:11 UTC] ennixo at free dot fr
Description:
------------
Apache crashes when calling a php function declared in a case statement and with a global variable.

Reproduce code:
---------------
$a = 1;
switch ($a)
{
    case 1:
        function test ()
        {
            global $plop;
            echo "test $plop";
        }
        $plop = "(bis)";
        test();
        break;
}

Expected result:
----------------
"test (bis)"

Actual result:
--------------
apache crashes.

just move the function outside the switch and it will work.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-27 12:26 UTC] tony2001@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.

See #29944.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 20:01:35 2024 UTC