realpath to convert environments folder links vs real folder

On some environments `DOCUMENT_ROOT` is different from the path of `__FILE__`.

The php method `realpath` match them to the same path structure and then `strlen` works as expected.