Use (int) cast instead of intval() function for performance reasons and to unify it.