bug7515.phpt 484 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. Bug #7515 (weird & invisible referencing of objects)
  3. --INI--
  4. error_reporting=2039
  5. --FILE--
  6. <?php
  7. class obj {
  8. function method() {}
  9. }
  10. $o->root=new obj();
  11. ob_start();
  12. var_dump($o);
  13. $x=ob_get_contents();
  14. ob_end_clean();
  15. $o->root->method();
  16. ob_start();
  17. var_dump($o);
  18. $y=ob_get_contents();
  19. ob_end_clean();
  20. if ($x == $y) {
  21. print "success";
  22. } else {
  23. print "failure
  24. x=$x
  25. y=$y
  26. ";
  27. }
  28. ?>
  29. --EXPECTF--
  30. Warning: Creating default object from empty value in %s on line %d
  31. success