![]() |
What does this function do?
Could someone briefly explain this function?
PHP Code:
|
php Code:
It's just an overcomplicated method to return a value of $l based on its key. It's also a waste of resources, considering it has to first retrieve $l from the global namespace, and then just pipes back a value that you could have easily gotten on your own (as illustrated above). It doesn't perform any error checking to see if the value exists and return a default if it doesn't, which is the only reason I could see it being useful. |
Well that's one of the most pointless functions I have seen in a good long while. Not only have you got the extra and unnecessary function call overhead, your also using a global variable, which as we all know can be linked to global warming and 3rd world debt.
|
I thought that had all been disproved, and Al Gore had switched to .NET.
|
Al Gore created .NET, but he uses Basic.
3rd world countries have debt? I thought we gave them the option to offer up their first born sons to the Masons and then we supported them with supplies of AK-47s to handle any dissidents? |
Al Gore helped with the funding for .NET, long before global variables came along to personally help programmers.
|
And isn't thisfunction a shining example of why we should comment our code and select logical function names...
Quote:
Cool though they may be, I never use variable variables, because they're a bit confusing - they save a few lines of code but lose maintainability and readability IMHO. |
Quote:
|
php Code:
No readability lost there. :) Not exactly the best use case example in the world, but in the end variable variables are just helpful shortcuts for those who like them. |
| All times are GMT. The time now is 05:30 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0