POOR:

<?php    
// echo always goes to STDOUT
echo("file doesn't exist\n");
exit(
1);
?>
  
PREFERRED:

<?php
// XMake displays on STDERR and exits, at build time
trigger_error("file doesn't exist",E_USER_ERROR );
?>