3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getSeed($data) { $seed = ""; for ($i = 0; $i < strlen($data); $i++) { $val = ord($data[$i]); $seed = $seed."$val"; } return $seed; } $seed = getSeed("test2dsfdsafdsafadsfaaaasd"); srand(intval($seed)); /* Seed random number generator */ $uid = rand(); echo $uid; ?>
Output for 7.1.0 - 7.2.0
209663185
Output for 4.3.0 - 7.0.20
254925627