3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { return "Wykopek"; } function bar($a) { return $a . ' harnasia'; } $template = "Michał {{foo}} kończył {{bar, 5}}."; $result = preg_replace_callback('/{{([^}]+)}}/', function($matches) { $parts = explode(', ', $matches[1]); $functionName = array_shift($parts); return $functionName(...$parts); }, $template); echo $result;
Output for git.master, git.master_jit, rfc.property-hooks
Michał Wykopek kończył 5 harnasia.

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:
58.04 ms | 1413 KiB | 4 Q