3v4l.org

run code in 300+ PHP versions simultaneously
<?php $limit = 5; function test ($limit, $useLimit) { $arr = [1,2,3,4,5,6,7,8,9,10]; foreach($arr as $key => $node) { if (!$useLimit || $key < $limit) { echo $node; } else { break; } } } echo "No limit:\n"; test($limit, false); echo "\n"; echo "With limit:\n"; test($limit, true);
Output for git.master_jit, git.master, rfc.property-hooks
No limit: 12345678910 With limit: 12345

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:
66.6 ms | 401 KiB | 8 Q