3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('firstname'=> "John", 'lastName'=>"Doe", 'email'=>"jdoe@example.com", 'username'=>"johndoe"); $array2 = array('firstname'=>"", 'email'=>""); foreach ($array2 as $key => &$value) { $value = $array1[$key]; } echo http_build_query($array2) . PHP_EOL; echo urldecode(http_build_query($array2)) . PHP_EOL; echo implode('&', array_map(function ($k, $v) { return "$k=$v"; }, array_keys($array2), $array2)); echo PHP_EOL; echo implode('&', array_map(function ($k, $v) { return "\"$k\"=\"$v\""; }, array_keys($array2), $array2));
Output for git.master, git.master_jit, rfc.property-hooks
firstname=John&email=jdoe%40example.com firstname=John&email=jdoe@example.com firstname=John&email=jdoe@example.com "firstname"="John"&"email"="jdoe@example.com"

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