3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "destination=Apartment+TITLIS+Resort+Wohnung+721&hotelid=0123454656"; if (($pos = strpos($data, "=")) !== FALSE) { $whatIWant = ucwords(substr($data, $pos+1)); $whatIWant = explode("&", $whatIWant); $whatIWant = $whatIWant[0]; echo "Ans1: \n"; echo $whatIWant; // Output: Apartment+TITLIS+Resort+Wohnung+721 // if you want your output with & just add & echo "\n\nAns2: \n"; $whatIWant = $whatIWant."&"; echo $whatIWant; // now Output iss: // Apartment+TITLIS+Resort+Wohnung+721& } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Ans1: Apartment+TITLIS+Resort+Wohnung+721 Ans2: Apartment+TITLIS+Resort+Wohnung+721&

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