Daniel Rotter
danielrotter.at
Daniel Rotter
@danielrotter.at
Studied and lectured Computer Science at fhvorarlberg, coorganizes VlbgWebDev and AgentConf, programming in #php, #symfony, #laravel, #javascript, #vuejs.

Currently working at Yummy Publishing, previously valantic, Sulu and MASSIVE ART.
Another nice example baked into #PHP why having different return types for the same function is a really bad idea. It just results in way more effort to do things right everywhere this function is used.
October 27, 2025 at 2:26 PM
Would have written it something like this. Don't get why they made the parentheses mandatory though, in JavaScript I would have written it without them.

For some totally subjective reason I find switch(true) or match(true) weird 🙈 But it definitely is better than a nested ternary in a single line 🙂
October 22, 2025 at 10:47 AM