DEV Community

Discussion on: Convert An Array To Object Using PHP (Hydrator Pattern)

Collapse
 
un3x profile image
Thomas Comes • Edited

Thanks for your post.
You should warn that using reflexion has performances issues.
Plus you have a strong binding between the structure of your array and the structure of your class.
Moreover you should use the hydrator pattern naming convention(as you mentionned it in your title).
Nontheless that's a cool code :)