Use floatval instead of intval.