3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 0xfffffffffffffbff; echo rand(0, $a)."\n"; echo rand(0, $a + 1)."\n"; echo rand(0, $a + 3)."\n";
Output for 7.0.0 - 7.1.0
Warning: rand() expects parameter 2 to be integer, float given in /in/nDv6Z on line 6 Warning: rand() expects parameter 2 to be integer, float given in /in/nDv6Z on line 7 Warning: rand() expects parameter 2 to be integer, float given in /in/nDv6Z on line 8
Output for 5.6.28
-1636 -40 -1520
Output for 5.6.25
-206 -810 -500
Output for 5.6.24
-1530 -1840 -1908
Output for 5.6.23
-1770 -620 -1781
Output for 5.6.22
-1977 -1375 -841
Output for 5.6.21
-51 -1379 -1218
Output for 5.6.20
-1614 -448 -472
Output for 5.6.19
-236 -28 -904
Output for 5.6.18
-284 -454 -387
Output for 5.6.17
-1880 -1446 -70
Output for 5.6.16
-1811 -1364 -439
Output for 5.6.15
-1778 -275 -1820
Output for 5.6.14
-402 -1108 -356
Output for 5.6.13
-826 -1015 -978
Output for 5.6.12
-2018 -574 -466
Output for 5.6.11
-952 -647 -347
Output for 5.6.10
-163 -1132 -693
Output for 5.6.9
-203 -136 -417
Output for 5.6.8
-1820 -1450 -1099
Output for 5.6.7
-957 -1325 -950
Output for 5.6.6
-1043 -259 -133
Output for 5.6.5
-440 -699 -1896
Output for 5.6.4
-1446 -1544 -294
Output for 5.6.3
-774 -440 -371
Output for 5.6.2
-270 -444 -1924
Output for 5.6.1
-1361 -707 -940
Output for 5.6.0
-742 -1831 -1854
Output for 5.5.38
-1936 -1563 -1520
Output for 5.5.37
-1656 -1684 -1819
Output for 5.5.36
-926 -341 -107
Output for 5.5.35
-426 -120 -1901
Output for 5.5.34
-1063 -840 -846
Output for 5.5.33
-709 -506 -1378
Output for 5.5.32
-1292 -731 -1391
Output for 5.5.31
-1732 -1400 -1734
Output for 5.5.30
-1990 -865 -1561
Output for 5.5.29
-722 -1707 -1082
Output for 5.5.28
-1798 -1496 -684
Output for 5.5.27
-590 -966 -310
Output for 5.5.26
-812 -1517 -1771
Output for 5.5.25
-979 -878 -808
Output for 5.5.24
-1111 -249 -520
Output for 5.5.23
-1816 -670 -1897
Output for 5.5.22
-514 -391 -762
Output for 5.5.21
-898 -464 -1267
Output for 5.5.20
-1186 -1254 -1931
Output for 5.5.19
-846 -456 -1643
Output for 5.5.18
-767 -1444 -241
Output for 5.5.16
-791 -551 -1444
Output for 5.5.15
-1035 -1189 -281
Output for 5.5.14
-825 -1330 -933
Output for 5.5.13
-859 -474 -25
Output for 5.5.12
-136 -1326 -1771
Output for 5.5.11
-1064 -1987 -1039
Output for 5.5.10
-981 -2046 -393
Output for 5.5.9
-863 -983 -973
Output for 5.5.8
-1444 -1078 -1889
Output for 5.5.7
-213 -900 -882
Output for 5.5.6
-476 -1337 -293
Output for 5.5.5
-495 -436 -1445
Output for 5.5.4
-664 -1303 -1823
Output for 5.5.3
-1757 -1873 -1206
Output for 5.5.2
-1161 -1269 -856
Output for 5.5.1
-360 -1203 -1829
Output for 5.5.0
-385 -1204 -1605
Output for 5.4.45
-1770 -361 -1269
Output for 5.4.44
-336 -1571 -11
Output for 5.4.43
-1311 -1627 -1377
Output for 5.4.42
-1000 -743 -1657
Output for 5.4.41
-189 -722 -1943
Output for 5.4.40
-1417 -735 -156
Output for 5.4.39
-39 -544 -1660
Output for 5.4.38
-141 -264 -1432
Output for 5.4.37
-6 -1309 -1925
Output for 5.4.36
-828 -194 -1326
Output for 5.4.35
-1249 -128 -1161
Output for 5.4.34
-1415 -2034 -1252
Output for 5.4.32
-1328 -1377 -1753
Output for 5.4.31
-11 -1708 -1582
Output for 5.4.30
-498 -809 -1510
Output for 5.4.29
-860 -746 -1134
Output for 5.4.28
-1733 -1891 -37
Output for 5.4.27
-478 -1913 -2010
Output for 5.4.26
-1587 -268 -745
Output for 5.4.25
-1336 -156 -824
Output for 5.4.24
-593 -1783 -1694
Output for 5.4.23
-1036 -1781 -16
Output for 5.4.22
-1357 -891 -169
Output for 5.4.21
-637 -1013 -835
Output for 5.4.20
-105 -10 -632
Output for 5.4.19
-1793 -2021 -1618
Output for 5.4.18
-1243 -1822 -409
Output for 5.4.17
-1241 -746 -1988
Output for 5.4.16
-228 -829 -630
Output for 5.4.15
-1366 -1019 -950
Output for 5.4.14
-1925 -1924 -506
Output for 5.4.13
-657 -323 -1122
Output for 5.4.12
-926 -1815 -1640
Output for 5.4.11
-116 -276 -1051
Output for 5.4.10
-186 -978 -914
Output for 5.4.9
-20 -61 -1115
Output for 5.4.8
-803 -518 -278
Output for 5.4.7
-805 -1461 -362
Output for 5.4.6
-403 -1854 -1732
Output for 5.4.5
-517 -485 -674
Output for 5.4.4
-1660 -982 -1627
Output for 5.4.3
-1254 -1367 -180
Output for 5.4.2
-1067 -1600 -172
Output for 5.4.1
-1115 -1096 -1401
Output for 5.4.0
-439 -322 -2020
Output for 5.3.29
-1100 -340 -1108
Output for 5.3.28
-722 -603 -1131
Output for 5.3.27
-1577 -791 -603
Output for 5.3.26
-544 -1075 -478
Output for 5.3.25
-330 -24 -1345
Output for 5.3.24
-1762 -1100 -2
Output for 5.3.23
-1837 -81 -554
Output for 5.3.22
-594 -354 -610
Output for 5.3.21
-1015 -1511 -1170
Output for 5.3.20
-1641 -852 -941
Output for 5.3.19
-76 -1131 -979
Output for 5.3.18
-1157 -928 -349
Output for 5.3.17
-639 -1626 -433
Output for 5.3.16
-744 -1228 -10
Output for 5.3.15
-817 -1216 -1021
Output for 5.3.14
-611 -1879 -1750
Output for 5.3.13
-1669 -165 -1614
Output for 5.3.12
-948 -260 -707
Output for 5.3.11
-1341 -1796 -19
Output for 5.3.10
-32 -1534 -854
Output for 5.3.9
-1842 -1811 -1376
Output for 5.3.8
-1063 -849 -1993
Output for 5.3.7
-1439 -533 -66
Output for 5.3.6
-942 -622 -1741
Output for 5.3.5
-1080 -1048 -646
Output for 5.3.4
-1268 -840 -1510
Output for 5.3.3
-540 -450 -113
Output for 5.3.2
-1657 -1708 -1741
Output for 5.3.1
-721 -784 -1481
Output for 5.3.0
-464 -271 -16
Output for 5.2.17
-72 -352 -1017
Output for 5.2.16
-1706 -526 -675
Output for 5.2.15
-499 -647 -266
Output for 5.2.14
-134 -1959 -1067
Output for 5.2.13
-926 -577 -781
Output for 5.2.12
-1210 -838 -1842
Output for 5.2.11
-38 -1626 -1113
Output for 5.2.10
-1316 -1667 -7
Output for 5.2.9
-1111 -566 -1435
Output for 5.2.8
-2041 -148 -672
Output for 5.2.7
-989 -1539 -1200
Output for 5.2.6
-204 -160 -488
Output for 5.2.5
-31 -1725 -709
Output for 5.2.4
-1551 -223 -713
Output for 5.2.3
-118 -1117 -928
Output for 5.2.2
-11 -1996 -776
Output for 5.2.1
-255 -2004 -682
Output for 5.2.0
-1163 -812 -204
Output for 5.1.6
-1953 -908 -1001
Output for 5.1.5
-984 -1133 -1870
Output for 5.1.4
-426 -51 -187
Output for 5.1.3
-1583 -724 -1315
Output for 5.1.2
-279 -92 -1457
Output for 5.1.1
-1385 -744 -1123
Output for 5.1.0
-1552 -1066 -335
Output for 5.0.5
-72 -636 -846
Output for 5.0.4
-2026 -775 -579
Output for 5.0.3
-281 -428 -1129
Output for 5.0.2
8436880271311110144 1079969329010704384 6370208138087366656
Output for 5.0.1
-1934 -357 -243
Output for 5.0.0
-1506 -144 -83
Output for 4.4.9
-2026 -73 -988
Output for 4.4.8
-1956 -212 -491
Output for 4.4.7
-125 -2028 -1945
Output for 4.4.6
-1052 -2002 -1333
Output for 4.4.5
-992 -2041 -188
Output for 4.4.4
-1944 -1408 -743
Output for 4.4.3
-243 -1665 -1240
Output for 4.4.2
-95 -1941 -1805
Output for 4.4.1
-22 -54 -383
Output for 4.4.0
-1151 -1105 -1508
Output for 4.3.11
-1973 -1974 -616
Output for 4.3.10
-563 -493 -645
Output for 4.3.9
-136 -1145 -1243
Output for 4.3.8
-749 -806 -678
Output for 4.3.7
-861 -849 -1580
Output for 4.3.6
-1276 -1227 -451
Output for 4.3.5
-484 -1452 -1370
Output for 4.3.4
-589 -1353 -46
Output for 4.3.3
-670 -1480 -1525
Output for 4.3.2
-764 -504 -548
Output for 4.3.1
-1079 -898 -1764
Output for 4.3.0
-1646 -1646 -213