Edit report at https://bugs.php.net/bug.php?id=80895&edit=1
ID: 80895
Updated by: cmb@php.net
Reported by: vasilevrvv at gmail dot com
Summary: Unexpected XML due to memory optimization in SOAP
-Status: Assigned
+Status: Open
Type: Bug
Package: SOAP related
Operating System: Linux
PHP Version: 8.0.3
-Assigned To: cmb
+Assigned To:
Block user comment: N
Private report: N
New Comment:
> Maybe it's better to change this logic?
Maybe, but I'm not sure. I don't see a problem when both client
and server are implemented in PHP, but perhaps there are issues if
the server is implemented in, for instance, Java. I'll leave that
for some SOAP expert to decide.
Previous Comments:
------------------------------------------------------------------------
[2021-03-24 14:38:38] vasilevrvv at gmail dot com
Oh, not an object, an array, I'm sorry.
------------------------------------------------------------------------
[2021-03-24 14:33:03] vasilevrvv at gmail dot com
I think this is not obvious behavior. To avoid references - I have to clone the object in the code.
Maybe it's better to change this logic?
------------------------------------------------------------------------
[2021-03-24 14:26:22] cmb@php.net
Well, apparently ext/soap indeed not only encodes references as
multi-reference values, but also zvals with refcount > 1. The
latter doesn't look right to me for arrays, because these are
value types in PHP, but not necessarily in other languages.
------------------------------------------------------------------------
[2021-03-24 13:57:59] vasilevrvv at gmail dot com
Hmm, in php5, the behavior is generally differen ti need to research
------------------------------------------------------------------------
[2021-03-24 13:31:56] vasilevrvv at gmail dot com
each pass of the foreach is the same zval, before trying to change it. and the soap library takes
this as a reference, but it is not a reference.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=80895
--
Edit this bug report at https://bugs.php.net/bug.php?id=80895&edit=1