1) This code:
<?
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 = parent::MAX_PRIORITY + 2;
}
?>

results in this error:

PHP Fatal error:  Unsupported operand types in /test.php on line 13

Shouldn't class constants support simple expressions ?

2) Also, this code:
<?
class test {
        const TEST = "hi";
        const TEST1 = self::TEST . "ih";
}
?>
Results in segmentation fault.

Cristiano Duarte

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to