If i have sting like
$str = '515';
I want convert it to int, is better use
$str = $str * 1;
than use
$str = intval($str);
which performance is better?
Casting the value using (int) should be the quickest option as intval() invokes a function (which has a small performance overhead)
$str = (int)$str;
see http://wiki.phpbb.com/Best_Practices:PHP#Typecasting for more information