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/5OKIC on line 5 Warning: rand() expects parameter 2 to be integer, float given in /in/5OKIC on line 6 Warning: rand() expects parameter 2 to be integer, float given in /in/5OKIC on line 7
Output for hhvm-3.12.0
-431 -1159 -2026
Output for hhvm-3.10.0
-836 -637 -1723
Output for 5.6.28
-1499 -724 -963
Output for 5.6.21
-836 -1247 -22
Output for 5.6.20
-607 -142 -1932
Output for 5.6.19
-1131 -195 -1690
Output for 5.6.18
-1603 -346 -1574
Output for 5.6.17
-1255 -1376 -1698
Output for 5.6.16
-1395 -1393 -454
Output for 5.6.15
-587 -604 -1854
Output for 5.6.14
-354 -630 -735
Output for 5.6.13
-1117 -1707 -1049
Output for 5.6.12
-1197 -927 -1014
Output for 5.6.11
-635 -1281 -1641
Output for 5.6.10
-92 -1615 -1324
Output for 5.6.9
-215 -711 -538
Output for 5.6.8
-1032 -670 -1691
Output for 5.6.7
-108 -986 -2037
Output for 5.5.35
-1936 -104 -1866
Output for 5.5.34
-1572 -336 -838
Output for 5.5.33
-313 -1686 -689
Output for 5.5.32
-936 -1834 -54
Output for 5.5.31
-53 -1377 -1967
Output for 5.5.30
-1786 -505 -1394
Output for 5.5.29
-1711 -734 -609
Output for 5.5.28
-1037 -1582 -1658
Output for 5.5.27
-2019 -619 -1
Output for 5.5.26
-1032 -90 -1149
Output for 5.5.25
-1172 -1148 -1543
Output for 5.5.24
-1088 -1038 -882
Output for 5.4.45
-86 -979 -1762
Output for 5.4.44
-1239 -198 -762
Output for 5.4.43
-32 -467 -592
Output for 5.4.42
-647 -990 -903
Output for 5.4.41
-365 -422 -1321
Output for 5.4.40
-1263 -2001 -360
Output for 5.4.39
-1411 -1017 -1195
Output for 5.4.38
-272 -137 -234
Output for 5.4.37
-696 -647 -1401
Output for 5.4.36
-255 -127 -1688
Output for 5.4.35
-1045 -901 -69
Output for 5.4.34
-1411 -1120 -286
Output for 5.4.32
-657 -1346 -983
Output for 5.4.31
-907 -28 -50
Output for 5.4.30
-1598 -463 -1792
Output for 5.4.29
-1250 -1154 -1844
Output for 5.4.28
-1240 -1166 -1626
Output for 5.4.27
-1966 -524 -54
Output for 5.4.26
-354 -1632 -699
Output for 5.4.25
-1017 -1788 -1089
Output for 5.4.24
-1738 -1024 -668
Output for 5.4.23
-598 -1584 -334
Output for 5.4.22
-259 -566 -627
Output for 5.4.21
-311 -276 -1794
Output for 5.4.20
-78 -1463 -1203
Output for 5.4.19
-802 -1905 -1585
Output for 5.4.18
-554 -1029 -159
Output for 5.4.17
-301 -1821 -462
Output for 5.4.16
-367 -141 -800
Output for 5.4.15
-1393 -1049 -97
Output for 5.4.14
-1272 -1968 -220
Output for 5.4.13
-1260 -1321 -147
Output for 5.4.12
-869 -259 -1746
Output for 5.4.11
-1558 -1671 -1124
Output for 5.4.10
-1779 -1070 -983
Output for 5.4.9
-804 -381 -787
Output for 5.4.8
-352 -900 -1856
Output for 5.4.7
-603 -713 -195
Output for 5.4.6
-841 -151 -954
Output for 5.4.5
-1195 -122 -845
Output for 5.4.4
-511 -352 -909
Output for 5.4.3
-1169 -1936 -1048
Output for 5.4.2
-1295 -754 -1396
Output for 5.4.1
-151 -1409 -919
Output for 5.4.0
-1100 -220 -1872
Output for 5.3.29
-1329 -1989 -1953
Output for 5.3.28
-1945 -1518 -141
Output for 5.3.27
-63 -1781 -1774
Output for 5.3.26
-1339 -901 -1244
Output for 5.3.25
-1150 -26 -693
Output for 5.3.24
-1369 -826 -29
Output for 5.3.23
-1005 -618 -1464
Output for 5.3.22
-1811 -1222 -1714
Output for 5.3.21
-1137 -1197 -597
Output for 5.3.20
-1182 -433 -428
Output for 5.3.19
-575 -263 -805
Output for 5.3.18
-1649 -810 -1707
Output for 5.3.17
-1852 -2008 -703
Output for 5.3.16
-982 -1500 -886
Output for 5.3.15
-241 -1375 -130
Output for 5.3.14
-2004 -1037 -1311
Output for 5.3.13
-1169 -97 -952
Output for 5.3.12
-887 -1321 -1905
Output for 5.3.11
-2014 -637 -1964
Output for 5.3.10
-1398 -20 -1609
Output for 5.3.9
-1199 -274 -627
Output for 5.3.8
-1764 -924 -1132
Output for 5.3.7
-83 -1675 -1212
Output for 5.3.6
-348 -1604 -773
Output for 5.3.5
-1813 -696 -763
Output for 5.3.4
-553 -394 -1309
Output for 5.3.3
-448 -1310 -1722
Output for 5.3.2
-1885 -885 -1234
Output for 5.3.1
-214 -2024 -1978
Output for 5.3.0
-1914 -1030 -461
Output for 5.2.17
-391 -362 -330
Output for 5.2.16
-885 -1916 -245
Output for 5.2.15
-186 -1373 -606
Output for 5.2.14
-694 -613 -1570
Output for 5.2.13
-1185 -1711 -720
Output for 5.2.12
-1397 -762 -1092
Output for 5.2.11
-1902 -1833 -870
Output for 5.2.10
-1155 -215 -1141
Output for 5.2.9
-883 -1288 -15
Output for 5.2.8
-683 -276 -1432
Output for 5.2.7
-919 -749 -2
Output for 5.2.6
-91 -990 -1461
Output for 5.2.5
-1682 -1910 -1271
Output for 5.2.4
-23 -1879 -1701
Output for 5.2.3
-1866 -414 -1216
Output for 5.2.2
-1357 -396 -657
Output for 5.2.1
-421 -1670 -810
Output for 5.2.0
-375 -540 -147
Output for 5.1.6
-67 -96 -756
Output for 5.1.5
-1590 -1766 -1181
Output for 5.1.4
-426 -1457 -723
Output for 5.1.3
-1797 -1981 -1122
Output for 5.1.2
-856 -1733 -208
Output for 5.1.1
-82 -1974 -807
Output for 5.1.0
-118 -763 -281
Output for 5.0.5
-467 -1711 -1057
Output for 5.0.4
-217 -1146 -780
Output for 5.0.3
-911 -595 -1235
Output for 5.0.2
6417678530414379008 7808963667612925952 3757162928692789248
Output for 5.0.1
-573 -451 -794
Output for 5.0.0
-1521 -1935 -351
Output for 4.4.9
-1066 -793 -845
Output for 4.4.8
-1071 -239 -1791
Output for 4.4.7
-408 -1064 -1100
Output for 4.4.6
-22 -233 -162
Output for 4.4.5
-1288 -1553 -24
Output for 4.4.4
-178 -1392 -1123
Output for 4.4.3
-1089 -893 -399
Output for 4.4.2
-1887 -922 -646
Output for 4.4.1
-1480 -1459 -1374
Output for 4.4.0
-819 -693 -1687
Output for 4.3.11
-1214 -497 -548
Output for 4.3.10
-588 -1614 -386
Output for 4.3.9
-522 -1712 -770
Output for 4.3.8
-1188 -960 -1299
Output for 4.3.7
-20 -150 -440
Output for 4.3.6
-1058 -378 -922
Output for 4.3.5
-1381 -1452 -1055
Output for 4.3.4
-1873 -363 -1316
Output for 4.3.3
-1596 -1635 -277
Output for 4.3.2
-686 -1080 -1376
Output for 4.3.1
-1694 -1785 -1288
Output for 4.3.0
-1052 -1165 -927