php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27669 calling method name contained in array
Submitted: 2004-03-24 05:42 UTC Modified: 2004-12-11 01:28 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: admin at solidox dot org Assigned: andi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2004-04-07 OS: *
Private report: No CVE-ID: None
 [2004-03-24 05:42 UTC] admin at solidox dot org
Description:
------------
calling a method of an uninstantiated class where the method
name is contained in an array causes an internal compiler error in php5 (tested b4 and rc1)
this works fine in php4.
i believe this is similar to bug #25652 and apparently it was fixed in cvs in late 2003.
this bug however exists in RC1, not sure if it's the same or related.

Reproduce code:
---------------
<?
        class A
        {
                function hello()
                {
                        echo "Hello World\n";
                }
        }
        $x = 'hello';
        $y[0] = 'hello';
        A::$x();
        A::$y[0]();
?>

Expected result:
----------------
Hello World
Hello World

Actual result:
--------------
Fatal error: Internal compiler error - please report! in /home/solidox/bug.php on line 12

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-07 06:07 UTC] sniper@php.net
verified too..

 [2004-06-14 10:17 UTC] profic at kursknet dot ru
I have rc3 and bug is still here
 [2004-07-26 11:27 UTC] ladislav dot prosek at matfyz dot cz
I have 5.0.0 and the bug is still there. You are kidding us, aren't you? ;-)

And you should update the Operator precedence table in documentation, by the way, as :: precedence seems to be undefined.
 [2004-12-11 01:28 UTC] andi@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

This was fixed already quite some time ago.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC