Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • I was about to post something similar, but you beat me to it. :) @Rudie: Also see php.net/manual/en/language.operators.errorcontrol.php#98895 Commented Sep 14, 2011 at 19:41
  • Awesome =) I didn't think it would be that simple. Very good explanation indeed. Commented Sep 14, 2011 at 20:00
  • Glad you like it. Best of luck mate. Commented Sep 14, 2011 at 20:01
  • @adam: Was looking in your profile and hit this post! I was looking forward for that answer! Good! Commented Sep 14, 2011 at 20:14
  • 2
    I know this answer is super old, but checking for 0 (zero) no longer works in PHP 8. See my answer on this page for how to handle it in both PHP 7 and 8. Commented Mar 26, 2023 at 3:56