We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

add volt function don't work

hi

why this code don't work???

    $volt->getCompiler()->addFunction('getBtCancelBack', function () {
        return  'hi';
    });

and calling in the volt file:

{{ getBtCancelBack() }}

I don't get the error message, the browser show only "the page cannot be shown". without php errors also.

php 5.5

phalcon 1.3.3 (tested on 1.3.2 also)

apache 2.4



98.9k

Are you using xdebug?

yes, but I can't identify the problem

xdebug crashes while running in this case



98.9k
Accepted
answer

three days trying to solve this...

thanks so much