self_class_const_outside_class.phpt 201 B

12345678910
  1. --TEST--
  2. Accessing self::FOO in a free function
  3. --FILE--
  4. <?php
  5. function test() {
  6. var_dump(self::FOO);
  7. }
  8. ?>
  9. --EXPECTF--
  10. Fatal error: Cannot use "self" when no class scope is active in %s on line %d