3v4l.org

run code in 200+ 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_srand( 0x%08x ): mt_rand() == 0x%08x == %d\n", $testseed, $r, $r); } ?>
Output for 7.1.0 - 7.2.0
mt_srand( 0x00000011 ): mt_rand() == 0x25b79537 == 632788279 mt_srand( 0x00000012 ): mt_rand() == 0x533f7695 == 1396668053 mt_srand( 0x00000013 ): mt_rand() == 0x0c7bfb2e == 209451822 mt_srand( 0x00000014 ): mt_rand() == 0x4b47deb1 == 1263001265 mt_srand( 0x00000015 ): mt_rand() == 0x063c9de4 == 104635876 mt_srand( 0x00000016 ): mt_rand() == 0x1aaed5ba == 447665594 mt_srand( 0x00000017 ): mt_rand() == 0x4236d129 == 1110888745 mt_srand( 0x00000018 ): mt_rand() == 0x7ae1d8d1 == 2061621457 mt_srand( 0x00000019 ): mt_rand() == 0x6f603a42 == 1868577346 mt_srand( 0x0000001a ): mt_rand() == 0x276a699a == 661285274 mt_srand( 0x0000001b ): mt_rand() == 0x367e0a09 == 914229769 mt_srand( 0x0000001c ): mt_rand() == 0x5d505280 == 1565545088 mt_srand( 0x0000001d ): mt_rand() == 0x6e8fafea == 1854910442 mt_srand( 0x0000001e ): mt_rand() == 0x52734b92 == 1383287698 mt_srand( 0x0000001f ): mt_rand() == 0x249d6969 == 614295913 mt_srand( 0x00000020 ): mt_rand() == 0x6df0156b == 1844450667 mt_srand( 0x00000021 ): mt_rand() == 0x1fcf2e0a == 533671434 mt_srand( 0x00000022 ): mt_rand() == 0x04ef96d0 == 82810576 mt_srand( 0x00000023 ): mt_rand() == 0x3aa18b64 == 983665508 mt_srand( 0x00000024 ): mt_rand() == 0x5d3fb942 == 1564457282 mt_srand( 0x00000025 ): mt_rand() == 0x78e543c7 == 2028291015 mt_srand( 0x00000026 ): mt_rand() == 0x31403ed0 == 826293968 mt_srand( 0x00000027 ): mt_rand() == 0x460076c4 == 1174435524 mt_srand( 0x00000028 ): mt_rand() == 0x342f16a3 == 875501219 mt_srand( 0x00000029 ): mt_rand() == 0x201e43e0 == 538854368 mt_srand( 0x0000002a ): mt_rand() == 0x2ff0ee33 == 804318771 mt_srand( 0x0000002b ): mt_rand() == 0x0eba1ba2 == 247077794 mt_srand( 0x0000002c ): mt_rand() == 0x6adc1b8a == 1792809866 mt_srand( 0x0000002d ): mt_rand() == 0x7e97ede5 == 2123886053 mt_srand( 0x0000002e ): mt_rand() == 0x64549e5e == 1683267166 mt_srand( 0x0000002f ): mt_rand() == 0x0e86ca43 == 243714627 mt_srand( 0x00000030 ): mt_rand() == 0x023d1f00 == 37560064 mt_srand( 0x00000031 ): mt_rand() == 0x268600d5 == 646316245 mt_srand( 0x00000032 ): mt_rand() == 0x3f4f1b58 == 1062148952 mt_srand( 0x00000033 ): mt_rand() == 0x567e5dff == 1451122175 mt_srand( 0x00000034 ): mt_rand() == 0x695badfa == 1767615994 mt_srand( 0x00000035 ): mt_rand() == 0x6c5f6f0c == 1818193676 mt_srand( 0x00000036 ): mt_rand() == 0x35c88e37 == 902336055 mt_srand( 0x00000037 ): mt_rand() == 0x0beaf8e6 == 199948518 mt_srand( 0x00000038 ): mt_rand() == 0x7df9ffaa == 2113535914 mt_srand( 0x00000039 ): mt_rand() == 0x0b2e45e7 == 187581927 mt_srand( 0x0000003a ): mt_rand() == 0x2ebbc791 == 784058257 mt_srand( 0x0000003b ): mt_rand() == 0x7646c858 == 1984350296 mt_srand( 0x0000003c ): mt_rand() == 0x26830466 == 646120550 mt_srand( 0x0000003d ): mt_rand() == 0x69883731 == 1770534705 mt_srand( 0x0000003e ): mt_rand() == 0x04521309 == 72487689 mt_srand( 0x0000003f ): mt_rand() == 0x46e78a16 == 1189579286 mt_srand( 0x00000040 ): mt_rand() == 0x30864ce2 == 814107874
Output for 5.2.1 - 7.0.20
mt_srand( 0x00000011 ): mt_rand() == 0x5afc6041 == 1526489153 mt_srand( 0x00000012 ): mt_rand() == 0x2c7483e3 == 745833443 mt_srand( 0x00000013 ): mt_rand() == 0x73300e58 == 1932529240 mt_srand( 0x00000014 ): mt_rand() == 0x340c2bc7 == 873212871 mt_srand( 0x00000015 ): mt_rand() == 0x79776892 == 2037868690 mt_srand( 0x00000016 ): mt_rand() == 0x65e520cc == 1709514956 mt_srand( 0x00000017 ): mt_rand() == 0x3d7d245f == 1031611487 mt_srand( 0x00000018 ): mt_rand() == 0x05aa2da7 == 95038887 mt_srand( 0x00000019 ): mt_rand() == 0x102bcf34 == 271306548 mt_srand( 0x0000001a ): mt_rand() == 0x58219cec == 1478597868 mt_srand( 0x0000001b ): mt_rand() == 0x4935ff7f == 1228275583 mt_srand( 0x0000001c ): mt_rand() == 0x221ba7f6 == 572237814 mt_srand( 0x0000001d ): mt_rand() == 0x11c45a9c == 298080924 mt_srand( 0x0000001e ): mt_rand() == 0x2d38bee4 == 758693604 mt_srand( 0x0000001f ): mt_rand() == 0x5bd69c1f == 1540791327 mt_srand( 0x00000020 ): mt_rand() == 0x12bbe01d == 314302493 mt_srand( 0x00000021 ): mt_rand() == 0x6084db7c == 1619319676 mt_srand( 0x00000022 ): mt_rand() == 0x7ba463a6 == 2074370982 mt_srand( 0x00000023 ): mt_rand() == 0x45ea7e12 == 1172995602 mt_srand( 0x00000024 ): mt_rand() == 0x22744c34 == 578047028 mt_srand( 0x00000025 ): mt_rand() == 0x07aeb6b1 == 128890545 mt_srand( 0x00000026 ): mt_rand() == 0x4e0bcba6 == 1309395878 mt_srand( 0x00000027 ): mt_rand() == 0x394b83b2 == 961250226 mt_srand( 0x00000028 ): mt_rand() == 0x4b64e3d5 == 1264903125 mt_srand( 0x00000029 ): mt_rand() == 0x5f55b696 == 1599452822 mt_srand( 0x0000002a ): mt_rand() == 0x50bb1b45 == 1354439493 mt_srand( 0x0000002b ): mt_rand() == 0x71f1eed4 == 1911680724 mt_srand( 0x0000002c ): mt_rand() == 0x1597eefc == 362278652 mt_srand( 0x0000002d ): mt_rand() == 0x01dc1893 == 31201427 mt_srand( 0x0000002e ): mt_rand() == 0x1b1f6b28 == 455043880 mt_srand( 0x0000002f ): mt_rand() == 0x71cd3f35 == 1909276469 mt_srand( 0x00000030 ): mt_rand() == 0x7d76ea76 == 2104945270 mt_srand( 0x00000031 ): mt_rand() == 0x59cdf5a3 == 1506669987 mt_srand( 0x00000032 ): mt_rand() == 0x4004ee2e == 1074064942 mt_srand( 0x00000033 ): mt_rand() == 0x2935a889 == 691382409 mt_srand( 0x00000034 ): mt_rand() == 0x1610588c == 370169996 mt_srand( 0x00000035 ): mt_rand() == 0x13149a7a == 320117370 mt_srand( 0x00000036 ): mt_rand() == 0x4a837b41 == 1250130753 mt_srand( 0x00000037 ): mt_rand() == 0x74a10d90 == 1956711824 mt_srand( 0x00000038 ): mt_rand() == 0x02b20adc == 45222620 mt_srand( 0x00000039 ): mt_rand() == 0x7465b091 == 1952821393 mt_srand( 0x0000003a ): mt_rand() == 0x51f032e7 == 1374696167 mt_srand( 0x0000003b ): mt_rand() == 0x090d3d2e == 151862574 mt_srand( 0x0000003c ): mt_rand() == 0x59c8f110 == 1506341136 mt_srand( 0x0000003d ): mt_rand() == 0x16c3c247 == 381928007 mt_srand( 0x0000003e ): mt_rand() == 0x7b19e67f == 2065294975 mt_srand( 0x0000003f ): mt_rand() == 0x39ac7f60 == 967606112 mt_srand( 0x00000040 ): mt_rand() == 0x4fcdb994 == 1338882452
Output for 4.3.0 - 5.2.0
mt_srand( 0x00000011 ): mt_rand() == 0x18d3f48b == 416543883 mt_srand( 0x00000012 ): mt_rand() == 0x5d2b27ca == 1563109322 mt_srand( 0x00000013 ): mt_rand() == 0x5d2b27ca == 1563109322 mt_srand( 0x00000014 ): mt_rand() == 0x66ab272b == 1722492715 mt_srand( 0x00000015 ): mt_rand() == 0x66ab272b == 1722492715 mt_srand( 0x00000016 ): mt_rand() == 0x13500ea3 == 324013731 mt_srand( 0x00000017 ): mt_rand() == 0x13500ea3 == 324013731 mt_srand( 0x00000018 ): mt_rand() == 0x590e2184 == 1494098308 mt_srand( 0x00000019 ): mt_rand() == 0x590e2184 == 1494098308 mt_srand( 0x0000001a ): mt_rand() == 0x65ee0c0c == 1710099468 mt_srand( 0x0000001b ): mt_rand() == 0x65ee0c0c == 1710099468 mt_srand( 0x0000001c ): mt_rand() == 0x38637847 == 946042951 mt_srand( 0x0000001d ): mt_rand() == 0x38637847 == 946042951 mt_srand( 0x0000001e ): mt_rand() == 0x299835c8 == 697841096 mt_srand( 0x0000001f ): mt_rand() == 0x299835c8 == 697841096 mt_srand( 0x00000020 ): mt_rand() == 0x57b2170b == 1471289099 mt_srand( 0x00000021 ): mt_rand() == 0x57b2170b == 1471289099 mt_srand( 0x00000022 ): mt_rand() == 0x328f7bff == 848264191 mt_srand( 0x00000023 ): mt_rand() == 0x328f7bff == 848264191 mt_srand( 0x00000024 ): mt_rand() == 0x54d2eaed == 1423108845 mt_srand( 0x00000025 ): mt_rand() == 0x54d2eaed == 1423108845 mt_srand( 0x00000026 ): mt_rand() == 0x79987501 == 2040034561 mt_srand( 0x00000027 ): mt_rand() == 0x79987501 == 2040034561 mt_srand( 0x00000028 ): mt_rand() == 0x7f5d0908 == 2136803592 mt_srand( 0x00000029 ): mt_rand() == 0x7f5d0908 == 2136803592 mt_srand( 0x0000002a ): mt_rand() == 0x52b19bac == 1387371436 mt_srand( 0x0000002b ): mt_rand() == 0x52b19bac == 1387371436 mt_srand( 0x0000002c ): mt_rand() == 0x538d34c2 == 1401763010 mt_srand( 0x0000002d ): mt_rand() == 0x538d34c2 == 1401763010 mt_srand( 0x0000002e ): mt_rand() == 0x79bf3903 == 2042575107 mt_srand( 0x0000002f ): mt_rand() == 0x79bf3903 == 2042575107 mt_srand( 0x00000030 ): mt_rand() == 0x43d7975f == 1138202463 mt_srand( 0x00000031 ): mt_rand() == 0x43d7975f == 1138202463 mt_srand( 0x00000032 ): mt_rand() == 0x2b622e17 == 727854615 mt_srand( 0x00000033 ): mt_rand() == 0x2b622e17 == 727854615 mt_srand( 0x00000034 ): mt_rand() == 0x6f29e669 == 1865016937 mt_srand( 0x00000035 ): mt_rand() == 0x6f29e669 == 1865016937 mt_srand( 0x00000036 ): mt_rand() == 0x30f0f212 == 821096978 mt_srand( 0x00000037 ): mt_rand() == 0x30f0f212 == 821096978 mt_srand( 0x00000038 ): mt_rand() == 0x1463e41f == 342090783 mt_srand( 0x00000039 ): mt_rand() == 0x1463e41f == 342090783 mt_srand( 0x0000003a ): mt_rand() == 0x153c37e7 == 356268007 mt_srand( 0x0000003b ): mt_rand() == 0x153c37e7 == 356268007 mt_srand( 0x0000003c ): mt_rand() == 0x2148200c == 558374924 mt_srand( 0x0000003d ): mt_rand() == 0x2148200c == 558374924 mt_srand( 0x0000003e ): mt_rand() == 0x50121f8e == 1343365006 mt_srand( 0x0000003f ): mt_rand() == 0x50121f8e == 1343365006 mt_srand( 0x00000040 ): mt_rand() == 0x1e4b2b9a == 508242842