News for hackers. Stuff that matters.
Re:My PHP Problems by timw4mail on Monday February 19, 2024 @08:17AM (#39429416)
The first point is kind of silly: You can make rust-style constructor functions if you want, and have a private constructor to enforce the behavior.

Although it does require some boilerplate, which may seem like pointless extra work.

Re:My PHP Problems by alfredbez on Tuesday February 20, 2024 @04:32AM (#39439388)
I think this was not the point, see:

> [...] only to realise there the class has a private constructor or that there are static constructors which I should be using [...]