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 'foo'; }, $line); echo $line;

preferences:
28.64 ms | 402 KiB | 5 Q