DEV Community

Discussion on: Difference between include, require, include_once and require_once in PHP

Collapse
 
samuelroland profile image
Samuel Roland

It's worth mentioning that the error you are talking about is that the file that we try to import is not found. include() can cause crash too for other reasons (the included php script contains functions already declared at the last inclusion for ex -> for this reason we use *_once() options).

Collapse
 
samuelroland profile image
Samuel Roland

But thanks for this little explanation !

Collapse
 
aminesaissihassani profile image
Amine Saissi Hassani

oh thank you for your feedback I really appreciate it, I will edit this post and add more examples and explanation!
Thank you!