Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't favor require, I require it (sorry for the pun).

The main issue is that include() will just emit a warning and continue if the file doesn't exist, often leading to a confusing fatal error in a completely different part of the code; in other words, On Error Continue Next, PHP version. Even worse, people who use include are even more likely to use @include().

Oh, and require_once(), while we're on the subject: "if you're purposefully trying to require() a file twice, you're doing something Very Wrong."



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: