Elektrine lite

← Feed

@nyamsprod@phpc.social

Post #3738893

2026-07-11 11:59 UTC

@heiglandreas@phpc.social I currently favour using `format()` and `fromFormat()` methods on my objects. with a Format Enum which list the most common use case in *my domain* and expose all the properties so that you can in your own domain define other string representations if needed via a Formatter or a Builder. I would argue that the best trade off I have for now 🤷‍♂️ . But the main take-away is it has to be explicit and __toString is everything but that.

Replies (0)

No replies.