using php functions in twig
<p>Right now I have the game account number which is showing all the numbers, but what I want is to only show the last 4 numbers.I am pretty new to Symfony, so my question is how can I have this code in twig ? Or Do I have to do it the controller ? Thanks in advance...</p>

<p>So what I want is this, which is the the code I want in twig. My confusion is dispalying this code in the twig:</p>

<pre><code>$gameId = '123456789';
$gameId = str_repeat('*', strlen($gameId) - 4) . substr($gameId, -4);

var_dump($gameId); //outputs  *****6789
</code></pre>

<p>this is what I already have, which is showing all the numbers that is being displayed from the form...</p>

<pre><code>  &lt;input value="{{ gameAccount.getAccountNumber() }}" 
    class="form-control" 
    dataid="{{ gameAccount.getId() }}" id="inputAccountNumber{{ gameAccount.getId() }}" 
    value="{# { gameAccount.getAccountNumber() } #}" 
    placeholder="Account Number" 
    type="text"&gt;
</code></pre>