You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An external PHP source file referenced by FILE_EXTERNAL breaks assumptions about __DIR__ pointing to directory of the source file so referenced.
Current behavior
It seems __DIR__ resolves to the directory of the test file including the source so specified in the FILE_EXTERNAL section, instead of the external file itself.
How to reproduce
# my.phpt
--FILE_EXTERNAL--
../external.php
# ../external.phpecho__DIR__, "\n";
Expected behavior
Should print the parent directory of my.phpt.
Currently prints the same directory as my.phpt.
The text was updated successfully, but these errors were encountered:
Summary
An external PHP source file referenced by
FILE_EXTERNAL
breaks assumptions about__DIR__
pointing to directory of the source file so referenced.Current behavior
It seems
__DIR__
resolves to the directory of the test file including the source so specified in theFILE_EXTERNAL
section, instead of the external file itself.How to reproduce
Expected behavior
Should print the parent directory of
my.phpt
.Currently prints the same directory as
my.phpt
.The text was updated successfully, but these errors were encountered: