I got it in the mail a couple of days ago. I was surprised to find out I didn’t have much to learn from the book. However, I did learn a couple cool details. I’m leaning to believe the PHP4 test covers the most commonly used functions in PHP while not forgetting about the php.ini file. I would assume the test leans a little harder on array capabilities as well. But drop that because I’m waiting for the PHP5 test.
Here is what I learned that might come in handy.
SHORT FORM IF-THEN-ELSE
This is just slick.
(condition ? value_if_true : value_if_false)
FUNCTIONS WITH VARIABLE PARAMETERS
It never accured to me to create a function that took variable parameters. All of these functions are self explanitory but until I saw them I never realy thought about creating functions with an unkown number of parameters..
func_num_args() // number of arguments
func_get_arg($arg_num) // pull one.
func_get_args() //get an array of the arguments.
CALLBACKS
The array_walk() function lets you iterate through an array sending each value to the function one at a time. I’m not sure I will be using it anytime soon but it sounds like it’d be helpful at some point in time or another.
sounds kinda like fun, I wish I had the time to learn
Have your appendix removed.
Posted by Josh Houghtelin, on August 30th, 2006, às 9:49 am. #.
THAT is funny ( about the appendix ). Thanks for posting your review here. Good to know. I will say that I did know about the short if statement and have used it a decent amount. I was AWARE of the ability to pass in any number of variables and then parse them out but had never had a real use for that.
Posted by Kiyu Gabriel, on September 1st, 2006, às 2:12 pm. #.
Burn My Time © 2007.
Simple Grey theme developed by Rodrigo P. Ghedin.
Brought by Wordpress Themes