3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1 = 1; $var2 = ""; $var3 = 7; $var4 = ""; $var5 = 7; $var6 = "foobar"; $var7 = "abc"; $var8 = 55; $var9 = 6; $var10 = 21; $var11 = "bc"; $var12 = ""; $i = 1; while(isset(${"var" . $i})){ if (!empty(${"var" . $i})) { $Data[] = ${"var" . $i}; } else { $Data[] = ' - '; } $i++; } var_dump($Data);
Output for git.master, git.master_jit, rfc.property-hooks
array(12) { [0]=> int(1) [1]=> string(3) " - " [2]=> int(7) [3]=> string(3) " - " [4]=> int(7) [5]=> string(6) "foobar" [6]=> string(3) "abc" [7]=> int(55) [8]=> int(6) [9]=> int(21) [10]=> string(2) "bc" [11]=> string(3) " - " }

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:
36.98 ms | 406 KiB | 5 Q