class_alias_003.phpt 254 B

12345678910111213141516171819202122
  1. --TEST--
  2. Testing declaration of alias to 'static'
  3. --FILE--
  4. <?php
  5. class bar {
  6. }
  7. class foo {
  8. public function test() {
  9. class_alias('bar', 'static');
  10. return new static;
  11. }
  12. }
  13. $a = new foo;
  14. var_dump($a->test());
  15. ?>
  16. --EXPECTF--
  17. object(foo)#%d (0) {
  18. }