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
Post a Comment