# execution on errors

- Thread: https://externals.io/message/9255
- Original archive: https://news-web.php.net/php.internals/9255
- Started by Enrico Weigelt on 2004-04-16T14:41:29+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9255 — Enrico Weigelt — 2004-04-16T14:41:29+00:00

URL: https://externals.io/message/9255#9255

Hi folks,


I've often got the problem that a larger application behaves unclear
if some of the include()'d/require()'ed scripts has some syntax error.
It seems that the all the code is executed until this require-statement
where the parse fails. If its an include() then it seems execution 
proceeds nevertheless.

In some situations this can be helpful, i.e. for larger frameworks
checking themselves (for example a module loader can simply try to
include() the module's code and properly handle the error when it fails).

But on the other hand there are many cases where this is problematic.

Is there any way to chance this behavour ?


regards,
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT services

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact@metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
   -- DSL-Zugang ab 0 Euro. -- statische IP -- UUCP -- Hosting

---

## #9257 — Derick Rethans — 2004-04-16T15:01:46+00:00

URL: https://externals.io/message/9255#9257 · In reply to: #9255

> I've often got the problem that a larger application behaves unclear
> if some of the include()'d/require()'ed scripts has some syntax error.
> It seems that the all the code is executed until this require-statement
> where the parse fails. If its an include() then it seems execution
> proceeds nevertheless.

This is correct and expected behavior, and also noted in the manual at:
http://nl3.php.net/include/

Derick
