3v4l.org

run code in 300+ PHP versions simultaneously
<?php $available_templates = [ '' => 'Placeholder', 404 => '404', 'single' => 'Single Post', ]; $merge = array_merge( [ '' => 'Default template', ], $available_templates ); $replace = array_replace( $available_templates, [ '' => 'Default template', ] ); var_dump( $merge ); var_dump( $replace );
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [""]=> string(11) "Placeholder" [0]=> string(3) "404" ["single"]=> string(11) "Single Post" } array(3) { [""]=> string(16) "Default template" [404]=> string(3) "404" ["single"]=> string(11) "Single Post" }

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