Forum Moderators: coopster
Like most developers, I'm learning PHP from printed manuals, online tutorials, experiments, and advice in this forum. When I need syntax clarification, I go to PHP.net. I have never encountered glob() until today.
My question is: what other features are hiding in the function list that we may not know about? Have you ever had a similar epiphany? What is your favourite "hidden gem" that goes unmentioned in the printed manuals like O'Reilly, Wrox, and the IDG Bible?
Some that I remember from my first few months of learning PHP were:
isset($var)
// myriad uses, inlcuding a "falseness" check for
// unchecked checkboxes
print_r($array)
// fantastic for debugging
foreach($array as $k=>$v)
// no more nasty $i increments and
// count($array) in my "for" loops
cal_days_in_month()
// it's about time
strtotime($string)
// excellent for weird date input from
// uncontrolled sources
getimagesize($filename)
// simply fantastic.
needed to do some tracking and pass vars to my apache logs from the SESSION
I read through the function list whenever I have some free time, I also try to read all the changelogs for new releases to see the added functions
<added>actually when I started using curl for various things it is pretty powerful and entertaining stuff
[ca.php.net...]
always seemed interesting but I have never really used them just fooled around a bit