Seems like PHP does something reasonably right for once!
$ php hello.php > /dev/full
$ echo $?
255
It doesn't exactly print an error, but at least it returns something non-zero.