Fastest way to convert string to integer in PHP
- by nickf
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?