I am writing an PHP CLI app which loads YAML files. When trying to do this within an Xdebug session:
if (file_exists(__DIR__ . '/../../foo/bar')
{
    /* ... */
}
__DIR__ allways is xdebug: which will allways lead to false from file_exists().
Is there any work around?
                        
Set
$dir = __DIR__;and useif (file_exists($dir . '/../../foo/bar'). It will work like that.