bug32429.phpt 543 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #32429 (method_exists() always return TRUE if __call method exists)
  3. --FILE--
  4. <?php
  5. class TestClass {
  6. public function __construct() {
  7. var_dump(method_exists($this, 'test'));
  8. if (method_exists($this, 'test')) {
  9. $this->test();
  10. }
  11. }
  12. public function __call($name, $args) {
  13. throw new Exception('Call to undefined method'.get_class($this).'::'.$name.'()');
  14. }
  15. }
  16. try {
  17. $test = new TestClass;
  18. } catch (Exception $e) {
  19. exit($e->getMessage());
  20. }
  21. ?>
  22. --EXPECT--
  23. bool(false)