Are include / require processed before code execution?
- ........ Tiptogo - Alexey Shimansky
- @ Alexey Shimansky and what dots? - user208916
- character limit in the comments - Alexey Shimansky
- Unlikely. How can they be processed before execution, if, for example, the path in them is specified via a variable. - Visman
- @Visman Ie include / require not processed before code execution? Are they included and processed as it is executed? - user208916
|
1 answer
<?php include 'nonexistent.php'; // Warning: include(nonexistent.php): failed to open stream: No such file or directory... // Warning: include(): Failed opening 'nonexistent.php' for inclusion... <?php if (false) { include 'nonexistent.php'; // Ошибки не вызвало. } Consequently, include not processed until the beginning of the execution of the code, despite the common misconception.
|