3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents = array('content1', 'content2', 'content3', 'content4'); $types = array('pdf', 'pdf', 'txt', 'pdf'); $links = array('link1', 'link2', 'link3'); $skip_type =0; foreach ($contents as $key => $value) { echo "$value\n"; if ($types[$key] == 'pdf') { echo $links[$key + $skip_type]."\n"; }else{ $skip_type--; } }
Output for git.master, git.master_jit, rfc.property-hooks
content1 link1 content2 link2 content3 content4 link3

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:
43.26 ms | 1388 KiB | 4 Q