PHP Day 4: Functions
This seven-minute video covers the basics of making functions, using functions, returning values, and reading function prototypes.
Links for PHP Day 4: Functions
Making functions:
- PHP Functions - An overview of creating your own functions, much more simple (in other words, less frightening) than the PHP manual.
- PHP: Functions - More advanced explanations and details from the PHP manual.
- Note: I forgot to mention that the naming rules for functions are the same as for variables.
Returning values:
- Return Values - A good overview from the Practical PHP Programming wiki.
- PHP: Returning Values - A more advanced overview from the PHP manual.
Function reference:
- PHP: Function Reference - Huge reference page for PHP functions. I suggest looking at the Mathematical Functions, String Functions, and maybe the Variable Handling Functions.
- Note: I also recently discovered that you can look up any function by typing in the URL: PHP.net/function-name. For example, PHP.net/echo or PHP.net/floor.
Reading function prototypes:
- How to Read a Function Definition (Prototype) - The PHP manual’s page on reading function prototypes.
- How to Read Function Prototypes - Another good overview.
Sorry if there’s a bit too much information here, but there’s a lot to cover! Please let me know if you think this is too much (or too little). Personally, I was a bit overwhelmed at first (especially after relaxing all weekend), but then things came together and it all made sense.



April 17th, 2007
Thank You
June 23rd, 2008
Hi Liz!
In searching for PHP video tutorials, I came across your blog. Thank you for the pleasant introduction to this useful programming language!
P.S. I live in Austin, TX (in case you were wondering)
July 31st, 2008
function, parameter operator, array, So many definitions.