#26724 [Opn->Fbk]: get_class() and __CLASS__ causing crashes and erratic behaviour
| From: | gschlossnagle@php.net | Date: | Sat, 27 Dec 2003 04:41:25 +0000 |
| Subject: | #26724 [Opn->Fbk]: get_class() and __CLASS__ causing crashes and erratic behaviour | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52513@lists.php.net to get a copy of this message | ||
ID: 26724
Updated by: gschlossnagle@php.net
Reported By: thought at phenomind dot com
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: Windows XP
PHP Version: 5CVS-2003-12-26 (dev)
New Comment:
Can you post an example that actually reproduces? A simple
class used with your code runs fine on OS X.
Previous Comments:
------------------------------------------------------------------------
[2003-12-26 23:08:41] thought at phenomind dot com
Problems also with get_object_vars()
If my script has this function anywhere, PHP5 produces erratic results.
------------------------------------------------------------------------
[2003-12-26 22:34:17] thought at phenomind dot com
Description:
------------
Apologise for not being able to describe this better or give example
code.
get_class() and __CLASS__ cause PHP5 to behave erratically. Sometimes
changes the data within the [argument] object and often causes Apache
to crash.
Problems experienced on Windows XP. Same problem also caused a Dual
Processor Mac OS-X box to soak up CPU time 1 processor. Script calls
get_class() many, many times or complex, composite objects.
The erratic behaviour is very hard to pin down but the source is
definitely get_class(). PHP5 objects are not very happy with this
function.
Reproduce code:
---------------
I can say:
print_r($object);
print get_class($object);
print_r($object);
Expected result:
----------------
1) object dump
2) Name of object
3) same object dump
Actual result:
--------------
1) object dump
2) Name of object
3) object dump with probably one property changed
No other code in the middle to cause this behaviour.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26724&edit=1