Bug #79115 [NEW]: ReflectionClass::isCloneable call reflected class __destruct
| From: | brucekwells at gmail dot com | Date: | Tue, 14 Jan 2020 15:04:04 +0000 |
| Subject: | Bug #79115 [NEW]: ReflectionClass::isCloneable call reflected class __destruct | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-224897@lists.php.net to get a copy of this message | ||
From: brucekwells at gmail dot com
Operating system: Windows 10
PHP version: 7.3.13
Package: Reflection related
Bug Type: Bug
Bug description:ReflectionClass::isCloneable call reflected class __destruct
Description:
------------
---
From manual page: https://php.net/reflectionclass.iscloneable
---
When ReflectionClass::isCloneable is called, it calls the reflected
class's destructor.
Output should be nothing, but returns "__destruct". Uncomment __clone,
and nothing is output, which is correct. See code snippet below.
Test script:
---------------
class A {
function __construct() { echo __FUNCTION__ . "\n"; }
function __destruct() { echo __FUNCTION__ . "\n"; }
// function __clone() { echo __FUNCTION__ . "\n"; }
}
$c = new ReflectionClass('A');
$c->isCloneable();
Expected result:
----------------
No output should be returned.
Actual result:
--------------
__destruct
--
Edit bug report at https://bugs.php.net/bug.php?id=79115&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79115&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79115&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79115&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79115&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79115&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79115&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79115&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79115&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79115&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79115&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79115&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79115&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79115&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79115&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79115&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79115&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79115&r=mysqlcfg