xref: /PHP-8.2/ext/soap/tests/bugs/gh16429.phpt (revision d613c0ed)
1--TEST--
2GH-16429 (Segmentation fault (access null pointer) in SoapClient)
3--EXTENSIONS--
4soap
5--FILE--
6<?php
7function gen() {
8    var_dump(str_repeat("x", yield));
9}
10$gen = gen();
11$gen->send(10);
12$fusion = $gen;
13$client = new SoapClient(__DIR__."/../interop/Round2/GroupB/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0));
14try {
15    $client->echo2DStringArray($fusion);
16} catch (Exception $e) {
17    echo $e->getMessage(), "\n";
18}
19?>
20--EXPECT--
21string(10) "xxxxxxxxxx"
22Cannot traverse an already closed generator
23