ID: 32076 Updated by: [EMAIL PROTECTED] Reported By: fablezouave at gmail dot com -Status: Feedback +Status: Closed Bug Type: Class/Object related Operating System: debian/GNU Linux PHP Version: 5.0.3 New Comment:
Previous Comments: ------------------------------------------------------------------------ [2005-04-13 00:25:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2005-02-23 13:34:14] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2005-02-23 09:02:09] fablezouave at gmail dot com Description: ------------ Hi It seems that the ReflectionMethod :: isDestructor() method always return true. Thanks Fab Reproduce code: --------------- <?php class Object { function __construct(){} function truc(){} function __destruct(){} } $R = new ReflectionClass('Object'); foreach($R->getMethods() as $val) { $M = new reflectionMethod($val->class, $val->name); echo '<h2>'.$val->name.'</h2>'; if($M->isConstructor()) echo 'Constructor<br/>'; // Always return TRUE if($M->isDestructor()) echo 'Destructor<br/>'; } ?> Expected result: ---------------- __construct Constructor truc __destruct Destructor Actual result: -------------- __construct Constructor Destructor truc Destructor __destruct Destructor ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32076&edit=1