3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo join(', ', array_map(function($x) { switch(($x%3==0) / ($x%5 ==0)) { case 0: return 'Fizz'; case INF: return 'Buzz'; case NAN: return 'FizzBuzz'; default: return x; } }, range(1, 100)));
Output for 7.0.0 - 7.1.0
Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz
Output for hhvm-3.12.0 - 3.13.2
Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz, x, Buzz, x, x, x, x, x, Buzz, x, Fizz, Buzz, x, x, Buzz, Fizz
Output for hhvm-3.10.0
Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz
Output for 5.3.0 - 5.6.28
Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/1BKEs on line 10 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Warning: Division by zero in /in/1BKEs on line 5 Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, x, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz, Fizz
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/1BKEs 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/1BKEs on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/1BKEs on line 3
Process exited with code 255.