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); var_dump(get_defined_vars()); die; echo $var, PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
array(11) { ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_FILES"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/4HZZk" } ["argc"]=> int(1) ["_SERVER"]=> array(17) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIL"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["HOME"]=> string(4) "/tmp" ["PHP_SELF"]=> string(9) "/in/4HZZk" ["SCRIPT_NAME"]=> string(9) "/in/4HZZk" ["SCRIPT_FILENAME"]=> string(9) "/in/4HZZk" ["PATH_TRANSLATED"]=> string(9) "/in/4HZZk" ["DOCUMENT_ROOT"]=> string(0) "" ["REQUEST_TIME_FLOAT"]=> float(1444687802.0001) ["REQUEST_TIME"]=> int(1444687802) ["argv"]=> array(1) { [0]=> string(9) "/in/4HZZk" } ["argc"]=> int(1) } ["i"]=> int(1) ["Fizz"]=> bool(false) ["Buzz"]=> bool(false) ["FizzBuzz"]=> bool(false) }

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.5 ms | 403 KiB | 8 Q