ID:               32429
 User updated by:  pasha dot zubkov at gmail dot com
 Reported By:      pasha dot zubkov at gmail dot com
 Status:           Verified
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux 2.6.11-grsec
-PHP Version:      5CVS-2005-03-23 (dev)
+PHP Version:      5CVS-2005-03-29 (dev)
 New Comment:

Any solution for this bag?


Previous Comments:
------------------------------------------------------------------------

[2005-03-24 14:20:44] pasha dot zubkov at gmail dot com

I checkout HEAD from cvs. Problem not solved.

------------------------------------------------------------------------

[2005-03-24 00:27:55] [EMAIL PROTECTED]

Confirmed with HEAD only.

------------------------------------------------------------------------

[2005-03-23 23:58:44] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-03-23 14:43:34] pasha dot zubkov at gmail dot com

Description:
------------
See example. I can't use `if (method_exists()) {}` because it always
return TRUE

Reproduce code:
---------------
<?php

class TestClass {
        public function __construct() {
                var_dump(method_exists($this, 'test'));

                if (method_exists($this, 'test')) {
                        $this->test();
                }
        }

        public function __call($name, $args) {
                throw new Exception('Call to undefined method
'.get_class($this).'::'.$name.'()');
        }
}

try {
        $test = new TestClass;
} catch (Exception $e) {
        exit($e->getMessage());
}

?>

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true) Call to undefined method TestClass::test()


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32429&edit=1

Reply via email to