3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo join(', ', array_map(function($x) { return $x.'['.($x%3-$x%5).']'; }, range(1, 100)));
Output for 5.3.0 - 7.1.0
1[0], 2[0], 3[-3], 4[-3], 5[2], 6[-1], 7[-1], 8[-1], 9[-4], 10[1], 11[1], 12[-2], 13[-2], 14[-2], 15[0], 16[0], 17[0], 18[-3], 19[-3], 20[2], 21[-1], 22[-1], 23[-1], 24[-4], 25[1], 26[1], 27[-2], 28[-2], 29[-2], 30[0], 31[0], 32[0], 33[-3], 34[-3], 35[2], 36[-1], 37[-1], 38[-1], 39[-4], 40[1], 41[1], 42[-2], 43[-2], 44[-2], 45[0], 46[0], 47[0], 48[-3], 49[-3], 50[2], 51[-1], 52[-1], 53[-1], 54[-4], 55[1], 56[1], 57[-2], 58[-2], 59[-2], 60[0], 61[0], 62[0], 63[-3], 64[-3], 65[2], 66[-1], 67[-1], 68[-1], 69[-4], 70[1], 71[1], 72[-2], 73[-2], 74[-2], 75[0], 76[0], 77[0], 78[-3], 79[-3], 80[2], 81[-1], 82[-1], 83[-1], 84[-4], 85[1], 86[1], 87[-2], 88[-2], 89[-2], 90[0], 91[0], 92[0], 93[-3], 94[-3], 95[2], 96[-1], 97[-1], 98[-1], 99[-4], 100[1]
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/Rlodt on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/Rlodt on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/Rlodt on line 3
Process exited with code 255.