3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = rand(2, PHP_INT_MAX); $range = range(1, $n); foreach ($range as $i){ foreach ($range as $j){ echo $i * $j, "\t"; } echo PHP_EOL; } ?>
based on XvlnE
Output for 7.3.0
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8130430423877943623 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.13
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1232042677045078412 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.12
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2921138152536547476 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.11
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2052625886180303361 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.10
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=9056536283644707676 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.9
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5710635084145905316 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.8
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=514596188823116628 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.7
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=801578855795465497 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.6
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6386353431815727011 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.5
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1029370833357349936 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.4
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8895375423462670482 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.3
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7958098230593970571 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.2
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=987502415377251360 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.1
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5671641264527797819 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.2.0
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1615343199989939157 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.25
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1438139866936625364 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.24
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=3261649033616977024 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.23
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1163636016087707437 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.22
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=374696110638138430 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.21
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8913128469882738244 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.20
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5949092769550037283 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.19
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2054928107091615317 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.18
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=3139029639132100302 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.17
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=831455223189828532 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.16
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5479216807052561426 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.15
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8592204850820609560 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.14
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6865300431042102363 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.13
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6425135931444551997 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.12
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8339711044457474913 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.11
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5145523197363336083 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.10
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=4292690713852819779 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.9
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=972914507760526552 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.8
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7834481440554572697 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.7
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7436652600779616744 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.6
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=3433602014471508485 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.5
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1583896231668606527 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.4
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2899051835231145507 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.3
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6199715921433037174 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.2
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=4467124918211569925 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.1
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1449065813466989303 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.1.0
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=3456074868274715229 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.33
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=3475692886899556354 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.32
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=4948147124966522882 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.31
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7328350221530824706 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.30
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8729747249342447618 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.29
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7305488033304805378 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.28
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2334722618420101122 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.27
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=826716097070759938 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.26
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7289582515277266946 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.25
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1091814264697520130 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.24
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1287523627884871682 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.23
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7433921836221464578 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.22
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=304475518718181378 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.21
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6268446189453049858 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.20
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5368443248639475714 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.19
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1840830821380915202 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.18
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1427864991406489602 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.17
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1947580339442417666 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.16
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7811901429538357250 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.15
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8698689443176906754 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.14
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2371349004303728642 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.13
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5123278479499984898 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.12
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6925967697779884034 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.11
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=6913943971194470402 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.10
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5734172564436025346 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.9
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5048376229837668354 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.8
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=7199833186442936322 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.7
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8465705145454297090 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.6
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=4714371707152891906 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.5
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1228616953124356098 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.4
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=5620255755274813442 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.3
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=1267863552526385154 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.2
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=3282994888492187648 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.1
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=2308348147673333760 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for 7.0.0
Warning: range(): The supplied range exceeds the maximum array size: start=1 end=8506248683245797376 in /in/jnq7q on line 3 Warning: Invalid argument supplied for foreach() in /in/jnq7q on line 5
Output for hhvm-3.22.0
Fatal error: request has exceeded memory limit in /in/jnq7q on line -1
Process exited with code 255.
Output for hhvm-3.10.1 - 3.21.3
Fatal error: request has exceeded memory limit in /in/jnq7q on line 3
Process exited with code 255.
Output for 5.3.0 - 5.6.38
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/jnq7q on line 3
Process exited with code 255.
Output for 5.2.2 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/jnq7q on line 3
Process exited with code 255.
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.2.1
1 2 2 4
Output for 4.3.10 - 4.3.11, 5.0.2 - 5.0.4
Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/jnq7q on line 2 Warning: rand() expects parameter 2 to be long, string given in /in/jnq7q on line 2 1 0 0 0
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/jnq7q on line 2 Warning: rand() expects parameter 2 to be long, string given in /in/jnq7q on line 2 1 0 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jnq7q on line 9 PHP_EOL0 0 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/jnq7q on line 9 PHP_EOL