PHP- Tips
I have been an ASP man for years.Recently however I found a need to program a project using PHP and Imust say to my surprise I found the experience exhilarating, for programming anyway.
Watch out!
Biggest pitfall in PHP is the requirement of the semicolon as aterminator for each line of code. One reason I liked ASP was there wasno such silly requirement. Your first attempts at PHP will likely befraught with error messages about "... unexpected T_STRING, expecting ',' or ';'.." PHP's interpretor will also be giving you a line number for the error that isdown the page from the missing semicolon. Very nice! So just check forthis and get your right pinky in the semicolon habit.
A few more PHP stumbling blocks
Another great one is that functions in PHP like $_POST are casesensitive - $_post will get you a misleading error with or with out thesemicolon. Many of the newer methods don't return a text string ratherthey return a resource and require a specific function toutilize the returned information if you echo a variable that contains aresource you will just get something like Resource Id #3 so in thedocumentation pay close attention to which functions are required towork together as there are a great many similarly named functions manyof which are depreciated or have been removed in later versions of PHP.
All in all these are the worst of it. Most of using PHP was a breezeand less coding than Microsoft's dang object oriented ASP. My projectturned out great check it out here Multi-File Uploads.
Watch out!
Biggest pitfall in PHP is the requirement of the semicolon as aterminator for each line of code. One reason I liked ASP was there wasno such silly requirement. Your first attempts at PHP will likely befraught with error messages about "... unexpected T_STRING, expecting ',' or ';'.." PHP's interpretor will also be giving you a line number for the error that isdown the page from the missing semicolon. Very nice! So just check forthis and get your right pinky in the semicolon habit.
A few more PHP stumbling blocks
Another great one is that functions in PHP like $_POST are casesensitive - $_post will get you a misleading error with or with out thesemicolon. Many of the newer methods don't return a text string ratherthey return a resource and require a specific function toutilize the returned information if you echo a variable that contains aresource you will just get something like Resource Id #3 so in thedocumentation pay close attention to which functions are required towork together as there are a great many similarly named functions manyof which are depreciated or have been removed in later versions of PHP.
All in all these are the worst of it. Most of using PHP was a breezeand less coding than Microsoft's dang object oriented ASP. My projectturned out great check it out here Multi-File Uploads.






Comments