What is Nostr?
Chris Abbey /
npub1ya4…rc44
2024-04-18 00:23:43

Chris Abbey on Nostr: Does anyone have a better way to write the conditional calls to foo at lines 5-9 of ...

Does anyone have a better way to write the conditional calls to foo at lines 5-9 of this #php code? https://3v4l.org/fqCvv The goal is to have the default argument for bar trigger the default argument for foo, but they're different defaults (since one is nullable and the other isn't), and bar should not need to know what foo's default is. (obviously in my real code it's a much more complex signature, and separate classes.)
Author Public Key
npub1ya447d0c3ycs3e87he9kpjz6psqzlhjjc3w4s0ztjaw83frryyqsyrrc44