Why PHP echo printf adds unexpected symbols : <p>I have php code:</p>

<pre><code>$searchTitlePersonType = ($isTravelAgency == true ? "tourists" : "persons"); 
var_dump($searchTitlePersonType); // Right behavior
</code></pre>

<p>The same time, when I try to implement it on my template:</p>

<pre><code>&lt;?php
    echo printf( $this-&gt;translate("Поиск %s"), $searchTitlePersonType ); 
?&gt;
</code></pre>

<p>I'm taking different unexpected numbers at the end of string: "tourists33" or "persons27". It's not depend of coding page of string and there is a lot of people who find the way to resolve it - do not combine <code>echo printf</code> in one line of code, but here my question about this problem: WHY does it happen?</p>

<p>Links: </p>

<p><a href="https://stackoverflow.com/questions/10849470/php-printf-adds-number-to-output">php printf adds number to output</a></p>

<p><a href="https://stackoverflow.com/questions/13776231/php-printf-adds-something-after-formatted-string">PHP printf adds something after formatted string</a></p>
