$z = 20 * random(10) - 10; $z->where($z < 0) .= - $z->where($z < 0)->abs->ceil; $z->where($z > 0) .= $z->where($z > 0)->ceil; print $z;