bug43332_2.phpt 321 B

12345678910111213141516
  1. --TEST--
  2. Bug #43332.2 (self and parent as type hint in namespace)
  3. --FILE--
  4. <?php
  5. namespace foobar;
  6. class foo {
  7. public function bar(\self $a) { }
  8. }
  9. $foo = new foo;
  10. $foo->bar($foo); // Ok!
  11. $foo->bar(new stdclass); // Error, ok!
  12. ?>
  13. --EXPECTF--
  14. Fatal error: '\self' is an invalid class name in %sbug43332_2.php on line 5