magic_const_deref.phpt 411 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Dereferencing of magic constants
  3. --FILE--
  4. <?php
  5. function test() {
  6. var_dump(__FUNCTION__[0]);
  7. var_dump(__FUNCTION__->prop);
  8. try {
  9. __FUNCTION__->method();
  10. } catch (Error $e) {
  11. echo $e->getMessage(), "\n";
  12. }
  13. }
  14. test();
  15. ?>
  16. --EXPECTF--
  17. string(1) "t"
  18. Warning: Attempt to read property "prop" on string in %s on line %d
  19. NULL
  20. Call to a member function method() on string