2008/10/27 Rodrigo Saboya <[EMAIL PROTECTED]>: > I agree with Stas. It's better to force people to actually reference their > classes/functions/constants correctly and get better performance than > getting unclear slowdowns.
If I'm not mistaken, you only experience any noticeable slowdown if all of these conditions are met: - you use an internal class many, many times (as the overhead from a handful of invocations would be negligible) - you do implement __autoload(), that __autoload() accesses the filesystem and the result is not cached (isn't there a stat cache?) or that __autoload() performs some kind of computation-intensive operation - you didn't reference the class using the global namespace (IOW, "new PDO" instead of "new \PDO") I'd expect people who execute that kind of code and care about performance to know that referencing internal classes in the correct namespace is more efficient. People who don't know the difference are likely to run worse code than that anyway (eg LIKE '%foo%' queries, in_array() in a loop, and other common mistakes). Perhaps the performance argument would have more weight if somebody benchmarked the impact on an average application? -JD -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php