From: cunha17 at uol dot com dot br
Operating system: RedHat Linux 9.0
PHP version: 5CVS-2003-08-30 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: class constants odd behavior
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 bug report at http://bugs.php.net/?id=25323&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25323&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25323&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25323&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25323&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25323&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25323&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25323&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25323&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25323&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25323&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25323&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25323&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25323&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25323&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25323&r=gnused