#30102 [Opn->Bgs]: Reflection API problems
| From: | helly@php.net | Date: | Thu, 16 Sep 2004 22:37:11 +0000 |
| Subject: | #30102 [Opn->Bgs]: Reflection API problems | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66317@lists.php.net to get a copy of this message | ||
ID: 30102
Updated by: helly@php.net
Reported By: mark at ttzn dot nl
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: win 2k sp4
PHP Version: 5.0.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Reflection API classes are not cloneable.
While in ze1 compat mode the engine tries to do so unless you assign by
explicit reference.
=> just DON'T MIX PHP 4 and PHP 5 specific functionality.
Either specific 4 or specific 5 but not compat mode
and all new features of 5.
Previous Comments:
------------------------------------------------------------------------
[2004-09-16 05:24:36] mark at ttzn dot nl
This seems to only occur when zend.ze1_compatibility_mode is set to
On.
Is this then still a bug or is it just me not understanding something?
------------------------------------------------------------------------
[2004-09-16 05:06:51] mark at ttzn dot nl
Description:
------------
When I wanted to test the reflection function in PHP5.0.1 I stumbled
upon something strange. For some reason it gives me an error that I did
not expect especially not from the example codes in the manual.
The error: Trying to clone an uncloneable object of class
ReflectionFunction ... is quite strange ... Either I am doing something
wrong or this is a real bug.
Please help me becouse I like to use the reflection API.
Reproduce code:
---------------
http://www.php.net/manual/en/language.oop5.reflection.php
Example 18-28. Using the ReflectionFunction class
Expected result:
----------------
Not the error
Actual result:
--------------
Fatal error: Trying to clone an uncloneable object of class
ReflectionFunction in D:\hosted\stuff\test.php on line 15
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30102&edit=1