Why not just use `(int) $cost`?