In Java you can try to convert any String value to Integer, but when value is something else, it will throw NumberFormatException. Is there similar functionality in PHP? I checked intval, but it returns values when String value obviously is not convert-able value.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
A language throwing an error is not really a useful feature, it's not what you're actually trying to do. |
|||
|
You can check it using |
|||
|