preg_replace_callback strange behaviour
<p>I can't understand why preg_replace_callback handle pattern like this</p>

<pre><code>    $article = "{{test1}} {{test2}}";

    $article = preg_replace_callback('{{(.*?)}}', 'handlePattern', $article);

    function handlePattern($matches) {
        echo "matches = " . print_r($matches, true);

    }
</code></pre>

<p>And it prints this result</p>

<pre><code>    matches = Array
(
    [0] =&gt; {{test1}
    [1] =&gt; {test1
)
matches = Array
(
    [0] =&gt; {{test2}
    [1] =&gt; {test2
)
</code></pre>

<p>But I expect that it have to be like this </p>

<pre><code>matches = Array
(
    [0] =&gt; {{test1}}
    [1] =&gt; test1
)
matches = Array
(
    [0] =&gt; {{test2}}
    [1] =&gt; test2
)
</code></pre>

<p>How can I get the content inside {{ }}?</p>