1--TEST--
2ZE2 class constants and scope
3--FILE--
4<?php
5
6class ErrorCodes {
7    const FATAL = "Fatal error\n";
8    const WARNING = "Warning\n";
9    const INFO = "Informational message\n";
10
11    static function print_fatal_error_codes() {
12        echo "self::FATAL = " . self::FATAL;
13    }
14}
15
16class ErrorCodesDerived extends ErrorCodes {
17    const FATAL = "Worst error\n";
18    static function print_fatal_error_codes() {
19        echo "self::FATAL = " . self::FATAL;
20        echo "parent::FATAL = " . parent::FATAL;
21    }
22}
23
24/* Call the static function and move into the ErrorCodes scope */
25ErrorCodes::print_fatal_error_codes();
26ErrorCodesDerived::print_fatal_error_codes();
27
28?>
29--EXPECT--
30self::FATAL = Fatal error
31self::FATAL = Worst error
32parent::FATAL = Fatal error
33