# using arrays instead of stdClass

- Thread: https://externals.io/message/30064
- Original archive: https://news-web.php.net/php.internals/30064
- Started by Lukas Kahwe Smith on 2007-06-05T09:32:19+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #30064 — Lukas Kahwe Smith — 2007-06-05T09:32:19+00:00

URL: https://externals.io/message/30064#30064

Hi,

Hopefully I am not overlooking something here, but I never really 
appreciated the fact that all my complex types are returned as stdClass 
instances by default. Of course you can override this with custom 
classes via the classmap, but I would much prefer simple boring arrays.

This has now become particularly relevant to me as APC seems to be less 
optimized for handling objects and specifically seems to be buggy 
handling stdClass [1].

@Dmitry: Could we add yet another option to the soap server class to be 
able to force array's instead of stdClass?

regards,
Lukas

[1] http://pecl.php.net/bugs/bug.php?id=8118

---

## #30066 — Dmitry Stogov — 2007-06-05T12:42:07+00:00

URL: https://externals.io/message/30064#30066 · In reply to: #30064

Hi Lukas,

I don't like to increase complexity of ext/soap with additional options.
It is already complex enough and simple object <-> array conversion doesn't
provide additional abilities.

I don't understand how ext/soap related to APC.

Thanks. Dmitry.

> -----Original Message-----
> From: Lukas Kahwe Smith [mailto:mls@pooteeweet.org] 
> Sent: Tuesday, June 05, 2007 1:32 PM
> To: PHP Developers Mailing List; Dmitry Stogov
> Subject: using arrays instead of stdClass
> 
> 
> Hi,
> 
> Hopefully I am not overlooking something here, but I never really 
> appreciated the fact that all my complex types are returned 
> as stdClass 
> instances by default. Of course you can override this with custom 
> classes via the classmap, but I would much prefer simple 
> boring arrays.
> 
> This has now become particularly relevant to me as APC seems 
> to be less 
> optimized for handling objects and specifically seems to be buggy 
> handling stdClass [1].
> 
> @Dmitry: Could we add yet another option to the soap server 
> class to be 
> able to force array's instead of stdClass?
> 
> regards,
> Lukas
> 
> [1] http://pecl.php.net/bugs/bug.php?id=8118
