// deprecated preg_replace
// http://www.smarty.net/forums/viewtopic.php?p=85326&sid=4c55c2c8725899fe98ebea5d94a21f7e
// /system/smarty/libs/Smarty_Compiler.class.php
/* replace special blocks by "{php}" */
$source_content = preg_replace($search.'e', "'"
. $this->_quote_replace($this->left_delimiter) . 'php'
. "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
. $this->_quote_replace($this->right_delimiter)
. "'"
, $source_content);