I have this simple test case file:
<?php
echo @filesize("notexistentfile");
echo "Done";
When I run it via nginx + fastcgi, sometimes it prints Done as expected (filesize on a non existent file is expected to raise a E_WARNING which is masked out by the @ operator), sometimes i receive a weird:
Fatal error: Uncaught exception 'Exception' with message 'filesize() [function.filesize]: stat failed for
To make it clear: I DONT HAVE any kind of error_handler which could intercept the error and then throw an exception.
Let's make it more clear: the issue is NOT about filesize failing or working: it ALWAYS fails (as exepcted) because the file is not existent.
The issue is that sometimes fails with an E_WARNING, sometimes with an exception