Fastest way to convert string to integer in PHP
Posted
by nickf
on Stack Overflow
See other posts from Stack Overflow
or by nickf
Published on 2008-10-27T05:18:57Z
Indexed on
2010/04/14
4:53 UTC
Read the original article
Hit count: 267
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?
© Stack Overflow or respective owner