<?php $conditional = '<?php echo('.$condition.') ? "'.addslashes($this->getVariable(trim($if_true), $data)).'" : "'.addslashes($this->getVariable(trim($if_false), $data)).'"; ?>';
$output = stripslashes($this->parsePhp($conditional));
$text = str_replace($match[0], $output, $text);