xref: /PHP-8.3/ext/soap/tests/bug75306.phpt (revision f320c356)
1--TEST--
2Bug #75306 (Memleak in SoapClient)
3--EXTENSIONS--
4soap
5--FILE--
6<?php
7$options = array("cache_wsdl" => WSDL_CACHE_NONE);
8// Need a warm-up for globals
9for ($i = 0; $i < 10; $i++) {
10    $client = new SoapClient(__DIR__ . "/test.wsdl", $options);
11}
12$usage = memory_get_usage();
13for ($i = 0; $i < 10; $i++) {
14    $client = new SoapClient(__DIR__ . "/test.wsdl", $options);
15}
16$usage_delta = memory_get_usage() - $usage;
17var_dump($usage_delta);
18?>
19--EXPECT--
20int(0)
21