11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.it-ebooks.infoCHAPTER 3 • <strong>PHP</strong> BASICSADVANCED DOCUMENTATION WITH <strong>PHP</strong>DOCUMENTORBecause documentation is such an important part of effective code creation and management,considerable effort has been put into devising solutions for helping developers automate the process. Infact, these days advanced documentation solutions are available for all mainstream programminglanguages, <strong>PHP</strong> included. phpDocumentor (www.phpdoc.org) is an open source project that facilitates thedocumentation process by converting the comments embedded within the source code into a variety ofeasily readable formats, including HTML and PDF.phpDocumentor works by parsing an application’s source code, searching for special comments known asDocBlocks. Used to document all code within an application, including scripts, classes, functions,variables, and more, DocBlocks contain human-readable explanations along with formalized descriptorssuch as the author’s name, code version, copyright statement, function return values, and much more.Even if you’re a novice programmer, it’s strongly suggested you become familiar with advanceddocumentation solutions and get into the habit of using them for even basic applications.Multiple-Line C SyntaxIt’s often convenient to include somewhat more verbose functional descriptions or other explanatorynotes within code, which logically warrants numerous lines. Although you could preface each line withC++ or shell-style delimiters, <strong>PHP</strong> also offers a multiple-line variant that can open and close thecomment on different lines. Here’s an example:Outputting Data to the BrowserOf course, even the simplest of dynamic web sites will output data to the browser, and <strong>PHP</strong> offers severalmethods for doing so.45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!