xref: /PHP-8.2/ext/soap/tests/bugs/bug40609.phpt (revision 7f2f0c00)
1--TEST--
2Bug #40609 (Segfaults when using more than one SoapVar in a request)
3--EXTENSIONS--
4soap
5--INI--
6soap.wsdl_cache_enabled=0
7--FILE--
8<?php
9ini_set("soap.wsdl_cache_enabled", 0);
10
11$c = new SoapClient(__DIR__."/bug40609.wsdl", array('trace' => 1, 'exceptions' => 0));
12
13$c->update(array('symbol' => new SoapVar("<symbol>MSFT</symbol>", XSD_ANYXML),
14                 'price' =>  new SoapVar("<price>1000</price>", XSD_ANYXML)));
15echo $c->__getLastRequest();
16echo "ok\n";
17?>
18--EXPECT--
19<?xml version="1.0" encoding="UTF-8"?>
20<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://quickstart.samples/xsd"><SOAP-ENV:Body><ns1:update><symbol>MSFT</symbol><price>1000</price></ns1:update></SOAP-ENV:Body></SOAP-ENV:Envelope>
21ok
22