ZF-1206: Zend_Filter_RealPath to support non-existing paths


I would like to suggest to add an enhancement to the current Zend_Filter_RealPath filter. PHP's function realpath will give you the absolute path from the provided path, however this does not work when a path does not exist. Realpath would then return false.

Allowing calculation of realpath() results when the input path does not exist, would be a good enhancement for the current implementation.

However, the developer should be able to turn this feature on/off, as I can imagine the need of having false returned when the path does not exist.


Assigned to Andries Seutens.

Update to summary and affects version 0.9.2.

There is working code available at

We have not agreed yet how to turn the feature on/off. I personally would prefer havinig a public property which could be set to true (default) or false.

Another idea is to have a public method {{allowVirtualPath(true)... }}

Updated priority from critical to minor.

Andries: Please give code or a description on how this should be done. Actually I see problems if the complete path does not exist.

When there is no response I will close this issue as won't fix as there are wether votes nor watchers on it.

I re-uploaded Andries' code:

New feature added with r15153