3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pagetext = 'Here\'s some text and stuff what is your favorite color? @OTHER["favorite color"] Whats your favorite food? @OTHER["favorite food"]'; $c = 0; while(strpos($pagetext, "@OTHER[") !== false){ $start = strpos($pagetext, '@OTHER["') + 8; $stop = strpos($pagetext, '"]', $start); $label = substr($pagetext, $start, $stop-$start); $pagetext = str_replace('@OTHER["'.$label.'"]','<input type="text" name="otherlabel'.$c.'" value="'.$label.'" /><input type="text" name="otherfield'.$c.'"><br /><small><i>'.$label.'</i></small>',$pagetext); $c++; } echo $pagetext;
Output for git.master, git.master_jit, rfc.property-hooks
Here's some text and stuff what is your favorite color? <input type="text" name="otherlabel0" value="favorite color" /><input type="text" name="otherfield0"><br /><small><i>favorite color</i></small> Whats your favorite food? <input type="text" name="otherlabel1" value="favorite food" /><input type="text" name="otherfield1"><br /><small><i>favorite food</i></small>

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.81 ms | 401 KiB | 8 Q