-
Notifications
You must be signed in to change notification settings - Fork 75
Enhancement: StringHelper::isEmpty() #166
Comments
That's simple enough check not to have a special wrapper for it: if (\trim($string) === '') { |
What about |
Wow... |
And one more question - I used to use helper
Can I do the same by native php function? |
No, that you cannot do with native function. |
Actually he can do this
It checks for all keys and when any defined does not exist it returns false, I don't see a reason to use dot syntax here |
BTW, I like null operator on similar case: |
From documentation
In case of "0" input value, the result isn't obvious. For me it is a string as is and the construction have to return FALSE!
So, my offer is to rely on string length instead of
empty()
function:The text was updated successfully, but these errors were encountered: