In most situations when encountering an unexpected condition within a script it is better
to stop execution rather then allowing script to proceed potentially causing further
errors and complicating debugging process.
<?php
if (!($fp = @fopen("some_file", "r"))) {
trigger_error("Failed to open 'some_file'", E_USER_ERROR);
}
?>