Using PHP, what’s the fastest way to convert a string like this: "123" to an integer?

Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an array?

8 Answers
8

Leave a Reply

Your email address will not be published. Required fields are marked *