026.phpt 380 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Trying assign value to property when an object is not returned in a function
  3. --FILE--
  4. <?php
  5. class foo {
  6. public function a() {
  7. }
  8. }
  9. $test = new foo;
  10. $test->a()->a;
  11. print "ok\n";
  12. $test->a()->a = 1;
  13. print "ok\n";
  14. ?>
  15. --EXPECTF--
  16. Notice: Trying to get property 'a' of non-object in %s on line %d
  17. ok
  18. Warning: Creating default object from empty value in %s on line %d
  19. ok