3v4l.org

run code in 300+ PHP versions simultaneously
<?php $defaults = array_fill_keys(['first_name', 'last_name', 'years'], null); var_export($defaults); $_GET = [ 'last_name' => 'doe', 'Hackers' => 'can be naughty', 'years' => 5 ]; var_export($_GET); $screened = array_intersect_key($_GET, $defaults); var_export($screened); $replaced = array_replace($defaults, $screened); var_export($replaced);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'first_name' => NULL, 'last_name' => NULL, 'years' => NULL, )array ( 'last_name' => 'doe', 'Hackers' => 'can be naughty', 'years' => 5, )array ( 'last_name' => 'doe', 'years' => 5, )array ( 'first_name' => NULL, 'last_name' => 'doe', 'years' => 5, )

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:
28.11 ms | 408 KiB | 9 Q