You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
572 B

  1. --TEST--
  2. ZE2 class constants and scope
  3. --SKIPIF--
  4. <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
  5. --FILE--
  6. <?php
  7. class ErrorCodes {
  8. const FATAL = "Fatal error\n";
  9. const WARNING = "Warning\n";
  10. const INFO = "Informational message\n";
  11. static function print_fatal_error_codes() {
  12. echo "FATAL = " . FATAL;
  13. echo "self::FATAL = " . self::FATAL;
  14. }
  15. }
  16. /* Call the static function and move into the ErrorCodes scope */
  17. ErrorCodes::print_fatal_error_codes();
  18. ?>
  19. --EXPECT--
  20. FATAL = Fatal error
  21. self::FATAL = Fatal error