3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'else if($rule==\'somerule1\') echo \'{"s":1,"n":"name surname"}\'; else if($rule==\'somerule2\') echo \'{"s":1,"n":"another text here"}\';'; $rule = "somerule1"; $pattern = "/else if\(\\\$rule=='$rule'\)\necho '{\"s\":\d+,\"n\":\"[^\"]*\"}';/"; $str = preg_replace($pattern, "", $str); echo $str;
Output for git.master, git.master_jit, rfc.property-hooks
else if($rule=='somerule2') echo '{"s":1,"n":"another text here"}';

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