Random values are not restricted to positive integers. The following example shows how to get random values from -10 to 10.
<?php echo "rand(-10, 10) = " . rand(-10, 10) . "\n"; echo "mt_rand(-10, 10) = " . mt_rand(-10, 10) . "\n"; ?>