Some functions used $Context or $Configuration by reference without modifying them.
It is slower than passing them by value (tested on php5.2.5 on windows and php 5.2.1 on ubuntu). The memory saved doesn't matter since the memory is free when the function exit (I guess).
I agree. The PHP documentation is clear that the parser is smart enough to not copy the variable passed unless necessary, and that passing by reference to attempt to improve performance is actually slower.
// Checks for a custom version of the specified file // Returns the path to the custom file (if it exists) or the default otherwise -function ThemeFilePath(&$Configuration, $FileName) { +function ThemeFilePath($Configuration, $FileName) { if (file_exists($Configuration['THEME_PATH'].$FileName)) { return $Configuration['THEME_PATH'].$FileName; } else { @@ -749,10 +749,11 @@ return preg_replace('![\s<"\']+!s', '', $FileName); }