3v4l.org

run code in 500+ PHP versions simultaneously
<?php $link = "http://example.com/values?value1=12121&order=3&external=AFB3432*"; $find = ["value1=", "order=", "external="]; $repl = [10000, 3, "AAAAA"]; foreach($find as $key => $f){ $pos1 = strpos($link, $f); $pos2 = strpos(substr($link, $pos1), "&"); if($pos2 !== false){ $link = str_replace(substr($link, $pos1, $pos2), $f . $repl[$key], $link); }else{ $link = str_replace(substr($link, $pos1), $f . $repl[$key], $link); } } echo $link;
Output for rfc.property-hooks, git.master, git.master_jit
http://example.com/values?value1=10000&order=3&external=AAAAA

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:
51.98 ms | 2015 KiB | 4 Q