I have a template with php enabled on output. However i can't get str_replace to work. See below code. If i just put {title} without any php then it works. But when i include php and place {title} inside the str_replace function, i get nothing displayed. I tried php with simple echo 'test'; and it worked. It's just not parsing {title} or other field tags.
{exp:channel:entries channel="one" url_title="{segment_2}"}
<?php
echo str_replace('old', 'new', '{title}');
?>
{/exp:channel:entries}