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