3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "name='John';phone='555-5555';city='oakland';"; $string2 = "city='oakland';phone='555-5555';name='John';"; $string3 = "phone='555-5555';name='John';city='oakland';"; $array = explode(';',$string3); sort($array); $array = array_filter($array); foreach($array as $value){ $split = explode('=',$value); $result[$split[0]] = $split[1]; } extract($result); echo "\$city = $city; \$name = $name; \$phone = $phone";
Output for git.master, git.master_jit, rfc.property-hooks
$city = 'oakland'; $name = 'John'; $phone = '555-5555'

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:
154.92 ms | 405 KiB | 5 Q