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
 [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 01 21:01:29 2024 UTC