Fork me on GitHub

exit or return true  Bottom

  • at the end of a zikula method we can put either "return true" or "exit"

    Code

    $pnRender->display("tpl.html");
        exit;// or return true
    }


    what is the more efficient
  • I would suggest to use

    Code

    $pnRender->display("tpl.html");
    return true;

    If you use "exit" script stops just after that.
    With "return true" script will continue and at least it will call pnShutDown() function (with closes sessions) or complete transactions (if somebody use them in Zikula :) )

    --
    Polish Zikula Team
    Bianor Works - my Zikula works on CoZi
  • thanks

This list is based on users active over the last 60 minutes.