1--TEST--
2SoapClient constructor with an invalid encoding option
3--EXTENSIONS--
4soap
5--FILE--
6<?php
7
8class ExtendedSoapClient extends SoapClient {}
9
10$wsdl = 'irrelevant';
11$options = [
12    'encoding' => 'non-sense',
13];
14try {
15    $client = new SoapClient($wsdl, $options);
16} catch (Throwable $e) {
17    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
18}
19try {
20    $client = new ExtendedSoapClient($wsdl, $options);
21} catch (Throwable $e) {
22    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
23}
24
25
26?>
27--EXPECT--
28SoapFault: SoapClient::__construct(): Invalid 'encoding' option - 'non-sense'
29SoapFault: SoapClient::__construct(): Invalid 'encoding' option - 'non-sense'
30