Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevArticles:
Taking Functions to the Next Level
Apr 21, 2003 @ 12:08:21

If you've been coding with PHP for a while, no doubt you've run into creating your own functions inside your scripts. You know how to pass values in and out, making the most of reusable code. Well, this new piece from DevArticles wants to help you take that a step further.

In this new article, Basic and Not so Basic "Function" Features Using PHP, the author starts you off with the basics of using functions (which you should know at this point), and then moves into ways to do more advanced things like: return more than one value, pass values by reference (useful with objects), and even creating dynamic functions for your scripts.

The last thing that they do involves something called a "Variable Indirect Function", but I'm not completely sure when something like this would be used. They give an example, but it's pretty specific to the example, and doesn't really give a good idea of a real-world example...

tagged:

Link:


Trending Topics: