call_user_func_004.phpt 418 B

123456789101112131415161718
  1. --TEST--
  2. Calling non-static method with call_user_func()
  3. --FILE--
  4. <?php
  5. class foo {
  6. public function teste() {
  7. $this->a = 1;
  8. }
  9. }
  10. call_user_func(array('foo', 'teste'));
  11. ?>
  12. --EXPECTF--
  13. Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method foo::teste() should not be called statically in %s on line %d
  14. Fatal error: Using $this when not in object context in %s on line %d