3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string= '[mycode="gallery" type="single" id="1" data="only"]'; echo preg_replace_callback('/\[([^\]]+)\]/', function($match) { $string = preg_replace('/\h*mycode="([^"]+)"\h*/', '$1/mycode', $match[1]); $string = preg_replace('/\h*type="([^"]+)"\h*/', 'mycode_$1.php', $string); $string = preg_replace('/\h*id="([^"]+)"\h*/', '?id=$1', $string); $string = preg_replace('/\h*data="([^"]+)"\h*/', '&data=$1', $string); return $string; }, $string);
Output for git.master, git.master_jit, rfc.property-hooks
gallery/mycodemycode_single.php?id=1&data=only

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