strings icon indicating copy to clipboard operation
strings copied to clipboard

What's the purpose to support null value in startsWith?

Open xepozz opened this issue 5 years ago • 3 comments

What's the purpose to support null value in startsWith?

xepozz avatar Sep 16 '20 19:09 xepozz

Originally it was made so parameter could be checked for it without checking for null.

samdark avatar Sep 17 '20 17:09 samdark

This may be ambiguous behavior in user code. If you need to allow check nulls then just do (string) $argument

xepozz avatar Sep 18 '20 07:09 xepozz

Could be adjusted in the next major version.

samdark avatar Sep 19 '20 19:09 samdark