3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = " [This is some text] "; echo preg_replace('/\[(.*?)\]/', '{$1}', $string);
based on NNn35
Output for 4.3.0 - 7.1.0
{This is some text}