Once you understand the philosophy behind a programming language, you can make superb use of it. Initial learning will show you a few things and get you comfortable, but once you've also learnt a few of the things behind the language you can become a real wizard. Your educated guesses will usually be correct, and you'll be able to move on to write productive original code as you understand the nature of the beast you're using.
PHP is a language that was designed to allow embedded functionality to be provided in the form of extra tags to be interpreted server side from within an extended HTML (this is why I sometimes call it an HTML++ language). There's a huge range of these extra tags, to the extent that I have a regular saying when I'm running a
PHP course that goes along the lines
"there's a function to do that" ... and some of those functions are truly remarkable.
Would you like to highlight your PHP syntax to help in debugging perhaps?
There's a function to do that
highlight_file("../../trainee/h106/a3.php4"); is the only active line in a demo file I've just uploaded.
The results presented show one of our training scripts in a much more readable form that the usual monochrome, and without the need to buy any extra editor addins / development tools either.
(written 2005-02-21, updated 2008-05-16)
Associated topics are indexed under
H105 - PHP - Functions [3026] Coding efficiency - do not repeat yourself! - (2010-11-02)
[2929] Passing a variable number of parameters in to a function / method - (2010-08-20)
[2737] Improving your function calls (APIs) - General and PHP - (2010-04-24)
[2682] Adding extensions to PHP Open Source applications - callbacks - (2010-03-17)
[2630] Static variables and ampersands in PHP - (2010-02-10)
[2488] A variable number of arguments in a PHP function - (2009-11-02)
[1784] Global - Tcl, PHP, Python - (2008-09-03)
[1380] Static variables in PHP - (2007-10-05)
[1357] Clean my plate, but keep my wine bottle. (PHP; Static) - (2007-09-18)
[1267] is there a lookup function in php? - (2007-07-15)
[1202] Returning multiple values from a function (Perl, PHP, Python) - (2007-05-24)
[1163] A better alternative to cutting and pasting code - (2007-04-26)
[1021] PHP - static declaration - (2007-01-04)
[936] Global, Superglobal, Session variables - scope and persistance in PHP - (2006-11-21)
[866] A lazy programmer is a good programmer - (2006-09-15)
[775] Do not duplicate your code - (2006-06-23)
[421] Don't repeat code - use loops or functions - (2005-08-21)
[409] Functions and commands with dangerous names - (2005-08-11)
[340] Code and code maintainance efficiency - (2005-06-08)
[339] Passing information into and out of PHP functions - (2005-06-07)
[308] Call by name v call by value - (2005-05-11)
[96] Variable Scope - (2004-10-22)
Some other Articles
Bellringing and Programming and Objects and PerlGrowing our systems10 years and countingYOUR application and YOUR dataThere is a function in PHP to do thatWho are all these visitors?Lunchtime DrinkWhen to use FramesSome unusual featuresGolden Nugget