Is require '/home/../http/' as fast as require '/http/'?
Question
I know that it is poor performance to use relative paths when including a file in php. But, is this true for for all paths or just paths relative to the assumed (context) include path?
Is this line
require '/home/../http/test.php'
as fast as this line
require '/http/test.php'
Solution
Basically yes. These paths are basically resolved first by php/apache then operating system.
OTHER TIPS
Either ways, an organized structure far out-weighs the small penalty spent on parsing a longer string.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow