3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = array( 'paramName1' => 'paramValue1', 'paramName2' => 'paramValue2' ); $html = <<<HTML Some example template with params 1 - {paramName1} 2 - {paramName2} 22 - {paramName2} HTML; $tpl_modifiers = array_keys($options); foreach($tpl_modifiers as $k=>$m) { $tpl_modifiers[$k] = '{' . $m . '}'; } unset($m, $k); $tpl_modifiers_values = array_values($options); $html = str_replace($tpl_modifiers, $tpl_modifiers_values, $html); unset($tpl_modifiers, $tpl_modifiers_values); var_dump($html);
Output for git.master, git.master_jit, rfc.property-hooks
string(85) " Some example template with params 1 - paramValue1 2 - paramValue2 22 - paramValue2 "

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