ID:               25323
 User updated by:  cunha17 at uol dot com dot br
 Reported By:      cunha17 at uol dot com dot br
 Status:           Open
 Bug Type:         Zend Engine 2 problem
 Operating System: RedHat Linux 9.0
-PHP Version:      5CVS-2003-08-30 (dev)
+PHP Version:      5CVS-2003-09-20 (dev)
 New Comment:

This but still exists in the latest CVS(2003-09-20 22:30)
:-(


Previous Comments:
------------------------------------------------------------------------

[2003-09-20 18:35:45] lphuberdeau at sympatico dot ca

I have also experienced this problem. The cvs snapshot I am using is
around 2 weeks old at this time, the problem might be fixed by now, but
it's not reported as fixed here, so here are a few more details about
the problem.

Information about the server:
Gentoo Linux
PHP5 from snaps, built with quite standard extensions.

I ran a few tests when I saw the segmentation fault in the output of my
script. I reduced the code as much as possible to locate the error and
here is what I found out.

Scripts are called directly from the PHP executable.

No problem in this code:

class foo
{
    const bar = 1;
}

Still no problem here:

class foo
{
    const bar = 1;
    const odd = foo::bar;
}

First error arrives here:
Fatal error: Unsupported operand types in /home/httpd/htdocs/foo.php on
line 5

class foo
{
    const bar = 1;
    const odd = foo::bar + 10;
}

And now with a Segmentation fault:
class foo
{
    const bar = 1;
    const odd = foo::bar . 10;
}

Summary:
I think there is a problem with the internal type of the constants.

I hope these details will help solve the problem.

------------------------------------------------------------------------

[2003-09-10 21:50:47] cunha17 at uol dot com dot br

Any information would be appreciated ...

------------------------------------------------------------------------

[2003-08-30 14:21:48] cunha17 at uol dot com dot br

Description:
------------
Is this suppose to work ? Currently it does not.

class Priority {
        const DEBUG = 0;
        const INFO = 1;
        const WARN = 2;
        const ERROR = 3;
        const FATAL = 4;

        const MAX_PRIORITY = FATAL;
}

class ExtendedPriority extends Priority {
        const REMOTE = Priority::MAX_PRIORITY + 1;
        const URGENT = Priority::MAX_PRIORITY + 2;
}

if it's not supposed to work, there is some parser problem in ZE2 that
accepts a constant expression based on string concatenation.

Reproduce code:
---------------
class test {
        const TEST = "hi";
        const TEST1 = self::TEST . "ih";
}


Expected result:
----------------
No parser error nor core dumps. Or a paser error if it's not supposed
to work.

Actual result:
--------------
Segmentation Fault


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25323&edit=1

Reply via email to