Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SomeOrDefault #70

Open
maxonfjvipon opened this issue Jan 17, 2023 · 0 comments
Open

SomeOrDefault #70

maxonfjvipon opened this issue Jan 17, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@maxonfjvipon
Copy link
Owner

Need and object that will behave like $object ?? $default.

For instance:

$some = ...; // can be null
new NumOrDefault($some, NumOf::int(0)) // if $some is null - 0 will be returned
@maxonfjvipon maxonfjvipon added the enhancement New feature or request label Jan 17, 2023
@maxonfjvipon maxonfjvipon self-assigned this Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant