3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line="This is the first test paragraph.{@font-face:Garamond}"; $line=preg_replace_callback('/\[([\w\s]*)\]{([\w\s\\@:=\'"-\.;^}]*)}/', function($match){ $inline=new Element('span'); $inline->html($match[1]); $this->_applyDeclaration($inline,$match[2]); return $inline; }, $line); echo $line;

preferences:
53.79 ms | 402 KiB | 5 Q