Doc #80884 [Ver->Csd]: SoapVar optional parameter types depend on PHP version
Edit report at https://bugs.php.net/bug.php?id=80884&edit=1
ID: 80884
Updated by: cmb@php.net
Reported by: php at hatlak dot de
Summary: SoapVar optional parameter types depend on PHP
version
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: SOAP related
PHP Version: 8.0.3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This has been fixed with
<https://github.com/php/doc-en/commit/5770355a66d2949f3132c7c6f4808dc035121a42>.
Previous Comments:
------------------------------------------------------------------------
[2021-03-18 23:23:17] cmb@php.net
Ah, right, good catch! Note that this changed only as of PHP
8.0.3.
------------------------------------------------------------------------
[2021-03-18 18:24:05] php at hatlak dot de
Description:
------------
---
From manual page: https://php.net/soapvar.construct
and https://php.net/class.soapvar
---
Both the SoapVar main page and constructor documentation state that the optional parameters only
accept string (and have an empty string as default value).
This changed with PHP 8:
https://github.com/php/php-src/commit/32d128d219f2d2d0767103091b4209a28f48b4ac
https://github.com/php/php-src/blob/master/ext/soap/soap.stub.php#L28
They are now all nullable and have NULL as default value.
The documentation needs to be updated in such a way that both variants are covered. It's
important because e.g. PHP 7.4 won't accept NULL (TypeError) while PHP 8 will.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80884&edit=1
Thread (3 messages)