Follow

You can make throw an error if a function is called without expected arguments, but not if a function is called with more arguments than expected.

I think maybe fixes this by allowing "void" as an argument type? I don't yet have a system with PHP8 on it, though, so I don't actually know.

If it doesn't, then this is a .

· · Web · 1 · 0 · 2

@woozle throw an optional param on the end that defaults to null and then check for a value? (except all in PHP-speak)

Silliness, but what is life but a never end parade of required silliness?

@SetecAstronomy I mean, yeah, there are ways to check in code (and sometimes I do that); it just makes everything more complicated to do it by hand.

Sign in to participate in the conversation
Toot.Cat

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!