return или много думал

GrayHound

Новичок
return или много думал

чего-то моя тупить сильно.... return как и exit прибивает выполнение скрипта? (само собой если return не внутри функции). Если это так - возможно этот return перехватить?.. ткните куда надо или скажите что я не прав
 

Kirill

Новичок
If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file. Furthermore, if the current script file was include()ed, then the value given to return() will be returned as the value of the include() call. If return() is called from within the main script file, then script execution ends. If the current script file was named by the auto_prepend_file or auto_append_file configuration options in php.ini, then that script file's execution is ended.
 

GrayHound

Новичок
усиленней искать надо было
Апокалипсис ну незнаю... допустим запуск phpшных скриптов (aka магиков) в шаблоннизаторе.... может там полезно будет... главное не злоупотреблять....
 
Сверху