3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*The task is to print out numbers 1 through 100 but for multiples of 3 print out “Fizz” instead of the number and for multiples of 5 print “Buzz” instead. If the number happens to be divisble by both 3 and 5 print out “FizzBuzz” instead of the number.*/ for ($i = 1; $i <= 100; $i++) { $Fizz = ($i % 3 === 0); $Buzz = ($i % 5 === 0); //$FizzBuzz = ($Fizz === true && $Buzz === true); foreach (array_splice(get_defined_vars(), 0, 1) as $key => $var) { echo ($var === true) ? $key : $i, PHP_EOL; } }
Output for git.master, git.master_jit, rfc.property-hooks
Notice: Only variables should be passed by reference in /in/9XBOg on line 11 1 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 2 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 3 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 4 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 5 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 6 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 7 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 8 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 9 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 10 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 11 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 12 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 13 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 14 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 15 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 16 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 17 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 18 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 19 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 20 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 21 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 22 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 23 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 24 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 25 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 26 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 27 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 28 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 29 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 30 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 31 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 32 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 33 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 34 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 35 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 36 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 37 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 38 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 39 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 40 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 41 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 42 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 43 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 44 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 45 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 46 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 47 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 48 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 49 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 50 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 51 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 52 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 53 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 54 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 55 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 56 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 57 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 58 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 59 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 60 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 61 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 62 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 63 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 64 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 65 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 66 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 67 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 68 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 69 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 70 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 71 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 72 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 73 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 74 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 75 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 76 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 77 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 78 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 79 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 80 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 81 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 82 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 83 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 84 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 85 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 86 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 87 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 88 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 89 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 90 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 91 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 92 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 93 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 94 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 95 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 96 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 97 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 98 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 99 Notice: Only variables should be passed by reference in /in/9XBOg on line 11 100

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.2 ms | 417 KiB | 8 Q