ID: 43852
Updated by: [EMAIL PROTECTED]
Reported By: lapo at lapo dot it
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: *
PHP Version: 5.2.5
New Comment:
That's the way private/protected properties are serialized, no bug
here.
Previous Comments:
------------------------------------------------------------------------
[2008-01-15 11:09:13] lapo at lapo dot it
On the other hand, (since 5.0.0) there is a testcase that specifically
checks that the output *does indeed* use zero bytes in private&protected
methods (tests/classes/bug26737.phpt).
If that testcase always succeded, I wonder how version 5.0.5 could
possibly have solved the problem outlined in bug #29865 (that is, the
fact that "\0" is used by serialize, the same as this bug does).
------------------------------------------------------------------------
[2008-01-15 08:52:46] lapo at lapo dot it
Description:
------------
It seems that bug #29865 is back: in release 5.2.5 serialize() uses
"ASCII 0" to serialize private property names.
Reproduce code:
---------------
% php -r 'class A { private $t;} echo serialize(new A());'|hexdump -C
Expected result:
----------------
00000000 4f 3a 31 3a 22 41 22 3a 31 3a 7b 73 3a 34 3a 22
|O:1:"A":1:{s:4:"|
00000010 ** 41 ** 74 22 3b 4e 3b 7d |.A.t";N;}|
Actual result:
--------------
00000000 4f 3a 31 3a 22 41 22 3a 31 3a 7b 73 3a 34 3a 22
|O:1:"A":1:{s:4:"|
00000010 00 41 00 74 22 3b 4e 3b 7d |.A.t";N;}|
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43852&edit=1