Skip to content
Advertisement

Tag: multiple-constructors

Best way to do multiple constructors in PHP

You can’t put two __construct functions with unique argument signatures in a PHP class. I’d like to do this: What is the best way to do this in PHP? Answer 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

Advertisement