php - Is (int)$var same as intval($var)? -


possible duplicates:
fastest way convert string integer in php
php: there particular difference between intval , (int)?

is (int)$var same intval($var) ?

apparently both same thing.

is there situation in return different results?

(int) seem bit faster intval, don't have overhead of function call. intval allows set optional base convert to, might useful:

int intval ( mixed $var [, int $base = 10 ] ) 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -