Backport for 3.3 branch: Fix for phar:// stream wrapper with no stub

Just read an article about 3.3.1
This is exactly the same as pull request #4080 for master branch