-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Implement boolval() #60
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
Conversation
How is this different from |
It isn't, but this is usable as callback. |
I accidentally also committed the |
@Jille Sorry, disregard that last part of my comment. |
With anon functions, I'm not sure why function($x) { return (bool)$x;} doesn't really solve this use case. |
Most of all it's a consistency improvement. We have |
Should this be discussed on the internals list? Should I open a bug and hope someone will merge it? Should I just wait till someone hits the "Merge" button? |
@Jille You should bring this up on internals. It adds a new function, so it can't be simply merged. Also it's debatable whether we really need it, so... writing a mail to internals should be the right thing to do :) |
It makes sense to add it to 5.5 |
74b4ef5 (in my boolval-branch) contains the function and a test. Thanks! |
Merged as 753c336. Thank you for your contribution. |
Would be great if you can also help the docteam adding that function to phpdoc :) |
Implementation based on strval()