Category
stdlib · php-src-strict · child of #3724 · SOAP encoding batch (APACHE_MAP)
Problem
php-src to_xml_map() encodes APACHE_MAP as xsi:type="{apache-ns}Map" with <item><key/><value/></item> children and xmlns http://xml.apache.org/xml-soap. After SoapVar unwrap (#32190), VM still treats the assoc enc_value as a generic typed node (xsi:type="apache:Map") without Map items.
| Repro (2026-08-18, php8.2-soap) |
Zend |
VM |
SoapVar(['k'=>'v'], APACHE_MAP) encoded RPC |
xmlns:ns2="http://xml.apache.org/xml-soap" + xsi:type="ns2:Map" + <item><key xsi:type="xsd:string">k</key><value xsi:type="xsd:string">v</value></item> |
xsi:type="apache:Map" without item/key/value |
php-src reference
PHP implementation target
Repro
./script/docker-exec.sh -- bash -lc 'apt-get update -qq; DEBIAN_FRONTEND=noninteractive apt-get install -y -qq php8.2-soap >/dev/null; php test/repro/issue_soapvar_apache_map.php; php bin/vm.php test/repro/issue_soapvar_apache_map.php'
Done when
Category
stdlib· php-src-strict · child of #3724 · SOAP encoding batch (APACHE_MAP)Problem
php-src
to_xml_map()encodesAPACHE_MAPasxsi:type="{apache-ns}Map"with<item><key/><value/></item>children andxmlnshttp://xml.apache.org/xml-soap. After SoapVar unwrap (#32190), VM still treats the assocenc_valueas a generic typed node (xsi:type="apache:Map") without Map items.SoapVar(['k'=>'v'], APACHE_MAP)encoded RPCxmlns:ns2="http://xml.apache.org/xml-soap"+xsi:type="ns2:Map"+<item><key xsi:type="xsd:string">k</key><value xsi:type="xsd:string">v</value></item>xsi:type="apache:Map"without item/key/valuephp-src reference
ext/soap/php_encoding.c—to_xml_map()/defaultEncoding[]APACHE_MAPext/soap/php_encoding.h—APACHE_MAP200,APACHE_NAMESPACEPHP implementation target
ext/soap/VmSoapClient.php—encodeSoapVar()APACHE_MAPbranch (peer of SOAP_ENC_OBJECT Stdlib: SoapVar SOAP_ENC_OBJECT encodes as nested array — Zend SOAP-ENC:Struct (ext/soap/php_encoding.c) #32192)ext/soap/SoapConstants.php— apache Map xmlns if not already declared on the envelopeRepro
./script/docker-exec.sh -- bash -lc 'apt-get update -qq; DEBIAN_FRONTEND=noninteractive apt-get install -y -qq php8.2-soap >/dev/null; php test/repro/issue_soapvar_apache_map.php; php bin/vm.php test/repro/issue_soapvar_apache_map.php'Done when
<item><key/><value/></item>like Zend.phptguard