3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rand_min = -getrandmax (); $rand_max = getrandmax (); $c = 1000; for ( $min = $rand_min; $min < 0; $min+=10000000 ) { $diff = $rand_max - abs ( $min ) + 1; $cnt = 0; for ( $i = 0; $i < $c; $i++ ) { $super_random_value = rand ( $min, $rand_max ); if ( $super_random_value == $diff ) $cnt++; } $per = $cnt * 100 / $c; echo "Number '${diff}' was generated ${cnt} times, " . $per . "%, minimum = ${min}\n"; }
based on kocal
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Number '1' was generated 0 times, 0%, minimum = -2147483647 Number '10000001' was generated 0 times, 0%, minimum = -2137483647 Number '20000001' was generated 0 times, 0%, minimum = -2127483647 Number '30000001' was generated 0 times, 0%, minimum = -2117483647 Number '40000001' was generated 0 times, 0%, minimum = -2107483647 Number '50000001' was generated 0 times, 0%, minimum = -2097483647 Number '60000001' was generated 0 times, 0%, minimum = -2087483647 Number '70000001' was generated 0 times, 0%, minimum = -2077483647 Number '80000001' was generated 0 times, 0%, minimum = -2067483647 Number '90000001' was generated 0 times, 0%, minimum = -2057483647 Number '100000001' was generated 0 times, 0%, minimum = -2047483647 Number '110000001' was generated 0 times, 0%, minimum = -2037483647 Number '120000001' was generated 0 times, 0%, minimum = -2027483647 Number '130000001' was generated 0 times, 0%, minimum = -2017483647 Number '140000001' was generated 0 times, 0%, minimum = -2007483647 Number '150000001' was generated 0 times, 0%, minimum = -1997483647 Number '160000001' was generated 0 times, 0%, minimum = -1987483647 Number '170000001' was generated 0 times, 0%, minimum = -1977483647 Number '180000001' was generated 0 times, 0%, minimum = -1967483647 Number '190000001' was generated 0 times, 0%, minimum = -1957483647 Number '200000001' was generated 0 times, 0%, minimum = -1947483647 Number '210000001' was generated 0 times, 0%, minimum = -1937483647 Number '220000001' was generated 0 times, 0%, minimum = -1927483647 Number '230000001' was generated 0 times, 0%, minimum = -1917483647 Number '240000001' was generated 0 times, 0%, minimum = -1907483647 Number '250000001' was generated 0 times, 0%, minimum = -1897483647 Number '260000001' was generated 0 times, 0%, minimum = -1887483647 Number '270000001' was generated 0 times, 0%, minimum = -1877483647 Number '280000001' was generated 0 times, 0%, minimum = -1867483647 Number '290000001' was generated 0 times, 0%, minimum = -1857483647 Number '300000001' was generated 0 times, 0%, minimum = -1847483647 Number '310000001' was generated 0 times, 0%, minimum = -1837483647 Number '320000001' was generated 0 times, 0%, minimum = -1827483647 Number '330000001' was generated 0 times, 0%, minimum = -1817483647 Number '340000001' was generated 0 times, 0%, minimum = -1807483647 Number '350000001' was generated 0 times, 0%, minimum = -1797483647 Number '360000001' was generated 0 times, 0%, minimum = -1787483647 Number '370000001' was generated 0 times, 0%, minimum = -1777483647 Number '380000001' was generated 0 times, 0%, minimum = -1767483647 Number '390000001' was generated 0 times, 0%, minimum = -1757483647 Number '400000001' was generated 0 times, 0%, minimum = -1747483647 Number '410000001' was generated 0 times, 0%, minimum = -1737483647 Number '420000001' was generated 0 times, 0%, minimum = -1727483647 Number '430000001' was generated 0 times, 0%, minimum = -1717483647 Number '440000001' was generated 0 times, 0%, minimum = -1707483647 Number '450000001' was generated 0 times, 0%, minimum = -1697483647 Number '460000001' was generated 0 times, 0%, minimum = -1687483647 Number '470000001' was generated 0 times, 0%, minimum = -1677483647 Number '480000001' was generated 0 times, 0%, minimum = -1667483647 Number '490000001' was generated 0 times, 0%, minimum = -1657483647 Number '500000001' was generated 0 times, 0%, minimum = -1647483647 Number '510000001' was generated 0 times, 0%, minimum = -1637483647 Number '520000001' was generated 0 times, 0%, minimum = -1627483647 Number '530000001' was generated 0 times, 0%, minimum = -1617483647 Number '540000001' was generated 0 times, 0%, minimum = -1607483647 Number '550000001' was generated 0 times, 0%, minimum = -1597483647 Number '560000001' was generated 0 times, 0%, minimum = -1587483647 Number '570000001' was generated 0 times, 0%, minimum = -1577483647 Number '580000001' was generated 0 times, 0%, minimum = -1567483647 Number '590000001' was generated 0 times, 0%, minimum = -1557483647 Number '600000001' was generated 0 times, 0%, minimum = -1547483647 Number '610000001' was generated 0 times, 0%, minimum = -1537483647 Number '620000001' was generated 0 times, 0%, minimum = -1527483647 Number '630000001' was generated 0 times, 0%, minimum = -1517483647 Number '640000001' was generated 0 times, 0%, minimum = -1507483647 Number '650000001' was generated 0 times, 0%, minimum = -1497483647 Number '660000001' was generated 0 times, 0%, minimum = -1487483647 Number '670000001' was generated 0 times, 0%, minimum = -1477483647 Number '680000001' was generated 0 times, 0%, minimum = -1467483647 Number '690000001' was generated 0 times, 0%, minimum = -1457483647 Number '700000001' was generated 0 times, 0%, minimum = -1447483647 Number '710000001' was generated 0 times, 0%, minimum = -1437483647 Number '720000001' was generated 0 times, 0%, minimum = -1427483647 Number '730000001' was generated 0 times, 0%, minimum = -1417483647 Number '740000001' was generated 0 times, 0%, minimum = -1407483647 Number '750000001' was generated 0 times, 0%, minimum = -1397483647 Number '760000001' was generated 0 times, 0%, minimum = -1387483647 Number '770000001' was generated 0 times, 0%, minimum = -1377483647 Number '780000001' was generated 0 times, 0%, minimum = -1367483647 Number '790000001' was generated 0 times, 0%, minimum = -1357483647 Number '800000001' was generated 0 times, 0%, minimum = -1347483647 Number '810000001' was generated 0 times, 0%, minimum = -1337483647 Number '820000001' was generated 0 times, 0%, minimum = -1327483647 Number '830000001' was generated 0 times, 0%, minimum = -1317483647 Number '840000001' was generated 0 times, 0%, minimum = -1307483647 Number '850000001' was generated 0 times, 0%, minimum = -1297483647 Number '860000001' was generated 0 times, 0%, minimum = -1287483647 Number '870000001' was generated 0 times, 0%, minimum = -1277483647 Number '880000001' was generated 0 times, 0%, minimum = -1267483647 Number '890000001' was generated 0 times, 0%, minimum = -1257483647 Number '900000001' was generated 0 times, 0%, minimum = -1247483647 Number '910000001' was generated 0 times, 0%, minimum = -1237483647 Number '920000001' was generated 0 times, 0%, minimum = -1227483647 Number '930000001' was generated 0 times, 0%, minimum = -1217483647 Number '940000001' was generated 0 times, 0%, minimum = -1207483647 Number '950000001' was generated 0 times, 0%, minimum = -1197483647 Number '960000001' was generated 0 times, 0%, minimum = -1187483647 Number '970000001' was generated 0 times, 0%, minimum = -1177483647 Number '980000001' was generated 0 times, 0%, minimum = -1167483647 Number '990000001' was generated 0 times, 0%, minimum = -1157483647 Number '1000000001' was generated 0 times, 0%, minimum = -1147483647 Number '1010000001' was generated 0 times, 0%, minimum = -1137483647 Number '1020000001' was generated 0 times, 0%, minimum = -1127483647 Number '1030000001' was generated 0 times, 0%, minimum = -1117483647 Number '1040000001' was generated 0 times, 0%, minimum = -1107483647 Number '1050000001' was generated 0 times, 0%, minimum = -1097483647 Number '1060000001' was generated 0 times, 0%, minimum = -1087483647 Number '1070000001' was generated 0 times, 0%, minimum = -1077483647 Number '1080000001' was generated 0 times, 0%, minimum = -1067483647 Number '1090000001' was generated 0 times, 0%, minimum = -1057483647 Number '1100000001' was generated 0 times, 0%, minimum = -1047483647 Number '1110000001' was generated 0 times, 0%, minimum = -1037483647 Number '1120000001' was generated 0 times, 0%, minimum = -1027483647 Number '1130000001' was generated 0 times, 0%, minimum = -1017483647 Number '1140000001' was generated 0 times, 0%, minimum = -1007483647 Number '1150000001' was generated 0 times, 0%, minimum = -997483647 Number '1160000001' was generated 0 times, 0%, minimum = -987483647 Number '1170000001' was generated 0 times, 0%, minimum = -977483647 Number '1180000001' was generated 0 times, 0%, minimum = -967483647 Number '1190000001' was generated 0 times, 0%, minimum = -957483647 Number '1200000001' was generated 0 times, 0%, minimum = -947483647 Number '1210000001' was generated 0 times, 0%, minimum = -937483647 Number '1220000001' was generated 0 times, 0%, minimum = -927483647 Number '1230000001' was generated 0 times, 0%, minimum = -917483647 Number '1240000001' was generated 0 times, 0%, minimum = -907483647 Number '1250000001' was generated 0 times, 0%, minimum = -897483647 Number '1260000001' was generated 0 times, 0%, minimum = -887483647 Number '1270000001' was generated 0 times, 0%, minimum = -877483647 Number '1280000001' was generated 0 times, 0%, minimum = -867483647 Number '1290000001' was generated 0 times, 0%, minimum = -857483647 Number '1300000001' was generated 0 times, 0%, minimum = -847483647 Number '1310000001' was generated 0 times, 0%, minimum = -837483647 Number '1320000001' was generated 0 times, 0%, minimum = -827483647 Number '1330000001' was generated 0 times, 0%, minimum = -817483647 Number '1340000001' was generated 0 times, 0%, minimum = -807483647 Number '1350000001' was generated 0 times, 0%, minimum = -797483647 Number '1360000001' was generated 0 times, 0%, minimum = -787483647 Number '1370000001' was generated 0 times, 0%, minimum = -777483647 Number '1380000001' was generated 0 times, 0%, minimum = -767483647 Number '1390000001' was generated 0 times, 0%, minimum = -757483647 Number '1400000001' was generated 0 times, 0%, minimum = -747483647 Number '1410000001' was generated 0 times, 0%, minimum = -737483647 Number '1420000001' was generated 0 times, 0%, minimum = -727483647 Number '1430000001' was generated 0 times, 0%, minimum = -717483647 Number '1440000001' was generated 0 times, 0%, minimum = -707483647 Number '1450000001' was generated 0 times, 0%, minimum = -697483647 Number '1460000001' was generated 0 times, 0%, minimum = -687483647 Number '1470000001' was generated 0 times, 0%, minimum = -677483647 Number '1480000001' was generated 0 times, 0%, minimum = -667483647 Number '1490000001' was generated 0 times, 0%, minimum = -657483647 Number '1500000001' was generated 0 times, 0%, minimum = -647483647 Number '1510000001' was generated 0 times, 0%, minimum = -637483647 Number '1520000001' was generated 0 times, 0%, minimum = -627483647 Number '1530000001' was generated 0 times, 0%, minimum = -617483647 Number '1540000001' was generated 0 times, 0%, minimum = -607483647 Number '1550000001' was generated 0 times, 0%, minimum = -597483647 Number '1560000001' was generated 0 times, 0%, minimum = -587483647 Number '1570000001' was generated 0 times, 0%, minimum = -577483647 Number '1580000001' was generated 0 times, 0%, minimum = -567483647 Number '1590000001' was generated 0 times, 0%, minimum = -557483647 Number '1600000001' was generated 0 times, 0%, minimum = -547483647 Number '1610000001' was generated 0 times, 0%, minimum = -537483647 Number '1620000001' was generated 0 times, 0%, minimum = -527483647 Number '1630000001' was generated 0 times, 0%, minimum = -517483647 Number '1640000001' was generated 0 times, 0%, minimum = -507483647 Number '1650000001' was generated 0 times, 0%, minimum = -497483647 Number '1660000001' was generated 0 times, 0%, minimum = -487483647 Number '1670000001' was generated 0 times, 0%, minimum = -477483647 Number '1680000001' was generated 0 times, 0%, minimum = -467483647 Number '1690000001' was generated 0 times, 0%, minimum = -457483647 Number '1700000001' was generated 0 times, 0%, minimum = -447483647 Number '1710000001' was generated 0 times, 0%, minimum = -437483647 Number '1720000001' was generated 0 times, 0%, minimum = -427483647 Number '1730000001' was generated 0 times, 0%, minimum = -417483647 Number '1740000001' was generated 0 times, 0%, minimum = -407483647 Number '1750000001' was generated 0 times, 0%, minimum = -397483647 Number '1760000001' was generated 0 times, 0%, minimum = -387483647 Number '1770000001' was generated 0 times, 0%, minimum = -377483647 Number '1780000001' was generated 0 times, 0%, minimum = -367483647 Number '1790000001' was generated 0 times, 0%, minimum = -357483647 Number '1800000001' was generated 0 times, 0%, minimum = -347483647 Number '1810000001' was generated 0 times, 0%, minimum = -337483647 Number '1820000001' was generated 0 times, 0%, minimum = -327483647 Number '1830000001' was generated 0 times, 0%, minimum = -317483647 Number '1840000001' was generated 0 times, 0%, minimum = -307483647 Number '1850000001' was generated 0 times, 0%, minimum = -297483647 Number '1860000001' was generated 0 times, 0%, minimum = -287483647 Number '1870000001' was generated 0 times, 0%, minimum = -277483647 Number '1880000001' was generated 0 times, 0%, minimum = -267483647 Number '1890000001' was generated 0 times, 0%, minimum = -257483647 Number '1900000001' was generated 0 times, 0%, minimum = -247483647 Number '1910000001' was generated 0 times, 0%, minimum = -237483647 Number '1920000001' was generated 0 times, 0%, minimum = -227483647 Number '1930000001' was generated 0 times, 0%, minimum = -217483647 Number '1940000001' was generated 0 times, 0%, minimum = -207483647 Number '1950000001' was generated 0 times, 0%, minimum = -197483647 Number '1960000001' was generated 0 times, 0%, minimum = -187483647 Number '1970000001' was generated 0 times, 0%, minimum = -177483647 Number '1980000001' was generated 0 times, 0%, minimum = -167483647 Number '1990000001' was generated 0 times, 0%, minimum = -157483647 Number '2000000001' was generated 0 times, 0%, minimum = -147483647 Number '2010000001' was generated 0 times, 0%, minimum = -137483647 Number '2020000001' was generated 0 times, 0%, minimum = -127483647 Number '2030000001' was generated 0 times, 0%, minimum = -117483647 Number '2040000001' was generated 0 times, 0%, minimum = -107483647 Number '2050000001' was generated 0 times, 0%, minimum = -97483647 Number '2060000001' was generated 0 times, 0%, minimum = -87483647 Number '2070000001' was generated 0 times, 0%, minimum = -77483647 Number '2080000001' was generated 0 times, 0%, minimum = -67483647 Number '2090000001' was generated 0 times, 0%, minimum = -57483647 Number '2100000001' was generated 0 times, 0%, minimum = -47483647 Number '2110000001' was generated 0 times, 0%, minimum = -37483647 Number '2120000001' was generated 0 times, 0%, minimum = -27483647 Number '2130000001' was generated 0 times, 0%, minimum = -17483647 Number '2140000001' was generated 0 times, 0%, minimum = -7483647