PHP include vs. include_once vs. require vs. require_once

Learn key differences among the PHP constructs: include vs. include_once vs. require vs. require_once & use them correctly.

PHP programmers regularly use the functions (or more appropriately known as language constructs) like include, include_once, require and require_once to insert useful files in the flow of execution. Although these constructs are used quite interchangeably, there are actually significant differences among them. Many programmers don't know well enough about these differences. I hope this post will help them towards a better coding practice.

Continue reading "PHP include vs. include_once vs. require vs. require_once"