3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $min = 17; $max = $min + 48; // 48 is to fit the results in my console for ($testseed=$min; $testseed<$max; $testseed++) { mt_srand( $testseed ); $r = mt_rand(); printf("mt_rand() == 12%8x%d\n", $testseed, $r, $r); } ?>
Output for 7.1.0
mt_rand() == 12 11632788279 mt_rand() == 12 121396668053 mt_rand() == 12 13209451822 mt_rand() == 12 141263001265 mt_rand() == 12 15104635876 mt_rand() == 12 16447665594 mt_rand() == 12 171110888745 mt_rand() == 12 182061621457 mt_rand() == 12 191868577346 mt_rand() == 12 1a661285274 mt_rand() == 12 1b914229769 mt_rand() == 12 1c1565545088 mt_rand() == 12 1d1854910442 mt_rand() == 12 1e1383287698 mt_rand() == 12 1f614295913 mt_rand() == 12 201844450667 mt_rand() == 12 21533671434 mt_rand() == 12 2282810576 mt_rand() == 12 23983665508 mt_rand() == 12 241564457282 mt_rand() == 12 252028291015 mt_rand() == 12 26826293968 mt_rand() == 12 271174435524 mt_rand() == 12 28875501219 mt_rand() == 12 29538854368 mt_rand() == 12 2a804318771 mt_rand() == 12 2b247077794 mt_rand() == 12 2c1792809866 mt_rand() == 12 2d2123886053 mt_rand() == 12 2e1683267166 mt_rand() == 12 2f243714627 mt_rand() == 12 3037560064 mt_rand() == 12 31646316245 mt_rand() == 12 321062148952 mt_rand() == 12 331451122175 mt_rand() == 12 341767615994 mt_rand() == 12 351818193676 mt_rand() == 12 36902336055 mt_rand() == 12 37199948518 mt_rand() == 12 382113535914 mt_rand() == 12 39187581927 mt_rand() == 12 3a784058257 mt_rand() == 12 3b1984350296 mt_rand() == 12 3c646120550 mt_rand() == 12 3d1770534705 mt_rand() == 12 3e72487689 mt_rand() == 12 3f1189579286 mt_rand() == 12 40814107874
Output for 5.2.1 - 7.0.14
mt_rand() == 12 111526489153 mt_rand() == 12 12745833443 mt_rand() == 12 131932529240 mt_rand() == 12 14873212871 mt_rand() == 12 152037868690 mt_rand() == 12 161709514956 mt_rand() == 12 171031611487 mt_rand() == 12 1895038887 mt_rand() == 12 19271306548 mt_rand() == 12 1a1478597868 mt_rand() == 12 1b1228275583 mt_rand() == 12 1c572237814 mt_rand() == 12 1d298080924 mt_rand() == 12 1e758693604 mt_rand() == 12 1f1540791327 mt_rand() == 12 20314302493 mt_rand() == 12 211619319676 mt_rand() == 12 222074370982 mt_rand() == 12 231172995602 mt_rand() == 12 24578047028 mt_rand() == 12 25128890545 mt_rand() == 12 261309395878 mt_rand() == 12 27961250226 mt_rand() == 12 281264903125 mt_rand() == 12 291599452822 mt_rand() == 12 2a1354439493 mt_rand() == 12 2b1911680724 mt_rand() == 12 2c362278652 mt_rand() == 12 2d31201427 mt_rand() == 12 2e455043880 mt_rand() == 12 2f1909276469 mt_rand() == 12 302104945270 mt_rand() == 12 311506669987 mt_rand() == 12 321074064942 mt_rand() == 12 33691382409 mt_rand() == 12 34370169996 mt_rand() == 12 35320117370 mt_rand() == 12 361250130753 mt_rand() == 12 371956711824 mt_rand() == 12 3845222620 mt_rand() == 12 391952821393 mt_rand() == 12 3a1374696167 mt_rand() == 12 3b151862574 mt_rand() == 12 3c1506341136 mt_rand() == 12 3d381928007 mt_rand() == 12 3e2065294975 mt_rand() == 12 3f967606112 mt_rand() == 12 401338882452
Output for 4.3.0 - 5.2.0
mt_rand() == 12 11416543883 mt_rand() == 12 121563109322 mt_rand() == 12 131563109322 mt_rand() == 12 141722492715 mt_rand() == 12 151722492715 mt_rand() == 12 16324013731 mt_rand() == 12 17324013731 mt_rand() == 12 181494098308 mt_rand() == 12 191494098308 mt_rand() == 12 1a1710099468 mt_rand() == 12 1b1710099468 mt_rand() == 12 1c946042951 mt_rand() == 12 1d946042951 mt_rand() == 12 1e697841096 mt_rand() == 12 1f697841096 mt_rand() == 12 201471289099 mt_rand() == 12 211471289099 mt_rand() == 12 22848264191 mt_rand() == 12 23848264191 mt_rand() == 12 241423108845 mt_rand() == 12 251423108845 mt_rand() == 12 262040034561 mt_rand() == 12 272040034561 mt_rand() == 12 282136803592 mt_rand() == 12 292136803592 mt_rand() == 12 2a1387371436 mt_rand() == 12 2b1387371436 mt_rand() == 12 2c1401763010 mt_rand() == 12 2d1401763010 mt_rand() == 12 2e2042575107 mt_rand() == 12 2f2042575107 mt_rand() == 12 301138202463 mt_rand() == 12 311138202463 mt_rand() == 12 32727854615 mt_rand() == 12 33727854615 mt_rand() == 12 341865016937 mt_rand() == 12 351865016937 mt_rand() == 12 36821096978 mt_rand() == 12 37821096978 mt_rand() == 12 38342090783 mt_rand() == 12 39342090783 mt_rand() == 12 3a356268007 mt_rand() == 12 3b356268007 mt_rand() == 12 3c558374924 mt_rand() == 12 3d558374924 mt_rand() == 12 3e1343365006 mt_rand() == 12 3f1343365006 mt_rand() == 12 40508242842