When calling a web service, certain fields in the response are defined to contain multiple values (they're arrays). However, when only one value is there, the extension just assigns the value instead of creating an array. For example, some query returns one string, "hello world", in the field arr:
// expected:
print_r( $response->arr ) // array( [0] => 'hello world' )
// reality: print_r( $response->arr ) // 'hello world'
It's not a huge deal because type casting makes everything better: foreach( (array) $response->arr as $value ) { // loop works in all cases }
So, what do you think? Is it a bug in the extension or a quirk due to the shift from a strictly typed language to a loose one?
-Nikolas Coukouma
-- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php