PHP Developers and the manual

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recently subscribed to php-general(2 months I think) and during this
time I saw some nice stuff, but most of the times (90% ?) It's always
the same thing.
PHP "Developers" that really have some kind of problem about reading
the Documentation.
This is not a rant, really! I'm an experienced developer and I have 5
years of php already, and I still learn new functions that I never
saw!
PHP has a extensive set of functions and objects that you can use to
solve almost anything, they are there, waiting for you,
and believe me, most of the times there's a function that will fit
perfectly for you.

Among these years I saw hundreds of lines of code, and came across
many different developers and quality of code, and some php developer
I worked think that knowing how to declare a function, a couple of
if's, prints and sql solved their problem and it was ok, but it is
NOT!

this one is a real life example of what can you end doing if you don't
READ THE MANUAL!

/* find the last day of the current month */
for ($i = 31; $i >= 28; $i--) {
  if (checkdate(date('m'),$i,date('Y'))) {
    $last_day = $i.date('/m/Y');
    break;
  }
}

ok... what about?

date('t/m/Y');
t = Number of days in the given month


this is just a short example in what you can end doing just because
you don't want to read the manual
think about the PHP online Documentation is great with great examples,
download the CHM or HTML to be accessible all the time

I hope it helps ;)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux