xref: /PHP-8.0/ext/soap/tests/bugs/bug77141.phpt (revision a555cc0b)
1--TEST--
2Bug #77141 (Signedness issue in SOAP when precision=-1)
3--SKIPIF--
4<?php
5if (!extension_loaded('soap')) die('skip soap extension not available');
6?>
7--FILE--
8<?php
9$soap = new \SoapClient(
10    null,
11    array(
12        'location' => "http://localhost/soap.php",
13        'uri' => "http://localhost/",
14        'style' => SOAP_RPC,
15        'trace' => true,
16        'exceptions' => false,
17    )
18);
19ini_set('precision', -1);
20$soap->call(1.1);
21echo $soap->__getLastRequest();
22?>
23--EXPECT--
24<?xml version="1.0" encoding="UTF-8"?>
25<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:call><param0 xsi:type="xsd:float">1.1</param0></ns1:call></SOAP-ENV:Body></SOAP-ENV:Envelope>
26