Best way to do multiple constructors in PHP
I’d probably do something like this: Then if i want a Student where i know the ID: Or if i have an array of the db row: Technically you’re not building multiple constructors, just static helper methods, but you get to avoid a lot of spaghetti code in the constructor this way.