SoapClient

The features option is a bitmask of these predefined SOAP Constants : SOAP_SINGLE_ELEMENT_ARRAYS, SOAP_USE_XSI_ARRAY_TYPE, SOAP_WAIT_ONE_WAY_CALLS.

Array problems with SOAP and PHP

Array problems with SOAP and PHP : When the back-end send an array with item count > 1 everything works fine. The problems start when there is only one item in the array.

PHP Bug #36226 Inconsistent handling when passing potential arrays, explain that this is not a bug, but a feature.

To get arrays containing one single element, simply create the SoapClient as follows:

$x = new SoapClient($wsdl, array(‘features’ => SOAP_SINGLE_ELEMENT_ARRAYS));