PHP


If you have not done so already, you should immediately acquire some version of the PHP manual before beginning to work with the language. The manual is available from the official PHP sitesee www.php.net/docs.php (Figure C.1)as well as a number of other locations. You can download the manual in over a dozen languages in any of these formats. The official Web site also has an annotated version of the manual available at www.php.net/manual/en, where other users have added helpful notes and comments that may solve some of the problems you encounter when using a particular function.

Figure C.1. The PHP manual is available in many forms.


Tips

  • You can quickly access the manual page for any particular function by going to the URL www.php.net/function_name.

  • The popularity of PHP is such that there are now two magazines on the subject. One is php|architect, www.phparch.com (Figure C.2), and the other is the International PHP Magazine, www.phpmag.net. Both are available in a downloadable PDF format.

    Figure C.2. The php|architect magazine is a popular publication for PHP programmers, available in both digital and print formats.



PHP Web sites

I'll mention just a few of the many very useful Web sites you can turn to when programming in PHP, and then leave it up to you to decide which ones you like the best. Most of these also contain links to other PHP-related sites.

The first, and most obvious, site to bookmark is PHP.net, www.php.net, the official site for PHP.

Next, you should familiarize yourself with Zend.com, www.zend.com (Figure C.3), the home page for the creators of the Zend Engine (the heart of PHP 4 and 5). The site contains numerous downloads plus a wealth of other resources, straight from the masters, so to speak.

Figure C.3. For PHP developers, the next-best thing to the PHP home page is Zend.com.


For information on specific topics, PHPBuilder, www.phpbuilder.com, is a great place to turn. The site has dozens of articles explaining how to do particular tasks using PHP and often MySQL.

WeberDev.com, www.weberdev.com, is a mixed bag of PHP and MySQL resources. There's an area of beginner guides, a section for finding work, and plenty of articles, code samples, and the like.

I did not cover one particular variable type in this book: objects. PHP does have support for object-oriented programming, which has been increased in PHP 5. As you improve upon your programming skills, and especially as you build a strong code library, being able to create and utilize objects can improve your programming speed and minimize run-time errors. You can find several good tutorials online regarding objects in PHP. You may also want to read this article at Zend.com, www.zend.com/zend/art/oo-proc.php (Figure C.4), which discusses object-oriented versus procedural programming. (Procedural programming is what this book uses.)

Figure C.4. One of the many articles you'll find at Zend.com is this introduction to OOP.


One final Web reference I'll mention is the PHP Coding Standard. The standard is a document making recommendations for programming in PHP in terms of proper format and syntax for variable names, control structures, and so forth. While you shouldn't feel obligated to abide by these rules, there are some solid and well-thought-out recommendations that can help minimize errors as you program. Unfortunately the PHP Coding Standard's URL changes with some frequency, so find the latest version by doing a search on "PHP Coding Standard".

Tip

  • Another source for coding standards can be found in the documentation for PEAR, http://pear.php.net (Figure C.5).

    Figure C.5. PEAR has its own thought-out rules for coding standards.



Newsgroups and mailing lists

If you have access to newsgroups, you can use these as a great sounding board for ideas, as well as a place to get your most difficult questions answered. Of course you can always give back to the group by offering your own expertise to those in need.

The largest English-language PHP newsgroup is comp.lang.php. You may be able to access comp.lang.php tHRough your ISP or via a pay-for-use Usenet organization. There are newsgroups available in languages other than English, too.

The PHP Web site lists the available mailing lists you can sign up for at www.php.net/mailing-lists.php (Figure C.6).

Figure C.6. There are dozens of PHP mailing lists that you can sign up for.


Code Repositories

There's no shortage of code libraries online these days. Due to the generous (and often showy) nature of PHP programmers, many sites have scores of PHP code, organized and available for download. The best online code repositories are

  • HotScripts.com, www.hotscripts.com

  • PX: the PHP code exchange, http://px.sklar.com (Figure C.7)

    Figure C.7. PX provides PHP code in many different categories.


  • The PHP Resource Index, http://php.resourceindex.com/Complete_Scripts/ (Figure C.8)

    Figure C.8. The PHP Resource Index has a lot of useful information, including hundreds of PHP scripts.


  • The PHP Classes Repository, www.phpclasses.org

Whether you are looking for a quick fix to a problem or want to see what other developers have done, these sites are worth a gander.

Tips

  • You can also find code examples at Zend.com, PHPBuilder.com, and many other general PHP Web sites.

  • Of course you can always find PHP scripts by doing a search using Google or other search engines.

  • The references listed in this appendixand many morecan be found on the links page of the book's supporting Web site.




    PHP and MySQL for Dynamic Web Sites. Visual QuickPro Guide
    PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    ISBN: 0321336577
    EAN: 2147483647
    Year: 2005
    Pages: 166
    Authors: Larry Ullman

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net