ID: 25323 Updated by: [EMAIL PROTECTED] Reported By: cunha17 at uol dot com dot br -Status: Open +Status: Closed Bug Type: Zend Engine 2 problem Operating System: RedHat Linux 9.0 PHP Version: 5CVS-2003-09-20 (dev) New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-10-15 20:04:44] lphuberdeau at phpquebec dot org The bug seems to be fixed (snapshot of 2003-10-15). ------------------------------------------------------------------------ [2003-09-20 21:56:20] cunha17 at uol dot com dot br This but still exists in the latest CVS(2003-09-20 22:30) :-( ------------------------------------------------------------------------ [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