Re: [PHP] Short circuit evaluation and include

2008-12-03 Thread David Ansermot
include and include_once dont throw fatal exception. You should use require or require_once and catch the exception with try{}catch{} block [EMAIL PROTECTED] a écrit : include and require are not functions. They are language constructs. They probably don't "return values" nor short-circui

Re: [PHP] Short circuit evaluation and include

2008-12-02 Thread ceo
include and require are not functions. They are language constructs. They probably don't "return values" nor short-circuit in the usual way. Ditto for "echo" If you can strip the parens and have it still work, it's for sure not a function. is perfectly valid code. PS All th

[PHP] Short circuit evaluation and include

2008-12-02 Thread Yeti
Hello everyone, I'm posting this as a warning when using include() or include_once() and checking their return values. I'm refactoring someone else's code at the moment and got a short circuit evaluation problem that made some problems .. Here's the code: FILE "some_file.php": some_method()