# mysqli_fetch_all(MYSQLI_OBJECT)

- Thread: https://externals.io/message/127099
- Original archive: https://news-web.php.net/php.internals/127099
- Started by Gareth Peters on 2025-04-12T10:28:55+00:00
- Messages: 1
- 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

---

## #127099 — Gareth Peters — 2025-04-12T10:28:55+00:00

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

On Sunday, 23 February 2025 at 02:57:07 GMT, Gareth Peters wrote:  
Hi all

I've written code to expand the functionality of mysqli_fetch_all. It allows you to fetch all results as objects rather than just arrays. It has the same features as fetch_object, such as being able to specify the name of a class to instantiate and being able to pass in an array of constructor arguments.

Is this feature likely to be of wider interest? If yes I can set aside time to work on an RFC.

Gareth
 
----------------------


   On Sunday, 23 February 2025 at 03:09:38 GMT, Kamil Tekiela wrote:  
 
 Hi,

Could you share the implementation?

Regards,
Kamil

----------------------

On Sunday, 23 February 2025 at 02:57:07 GMT, Gareth Peters wrote: 

Hi Kamil
https://github.com/ecvej/php-src/tree/mysqli-fetch-all-objects
Gareth

----------------------
Hi Kamil et al - did you have an thoughts on whether this feature is worth adding?
