ob_start_basic_005.phpt 545 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. ob_start(): non-static method as static callbacks.
  3. --FILE--
  4. <?php
  5. /*
  6. * Function is implemented in main/output.c
  7. */
  8. Class C {
  9. function h($string) {
  10. return $string;
  11. }
  12. }
  13. function checkAndClean() {
  14. print_r(ob_list_handlers());
  15. while (ob_get_level()>0) {
  16. ob_end_flush();
  17. }
  18. }
  19. var_dump(ob_start('C::h'));
  20. checkAndClean();
  21. ?>
  22. --EXPECTF--
  23. Warning: ob_start(): non-static method C::h() cannot be called statically in %s on line %d
  24. Notice: ob_start(): Failed to create buffer in %s on line %d
  25. bool(false)
  26. Array
  27. (
  28. )