- One of the great things about PHP is its vibrant and active community. Developers enjoy many online meeting points, including the SitePoint Forums, where developers get together to help each other out with problems they face on a daily basis, from the basics of how PHP works, to solving design problems like “How do I validate a form?” As a way to get help, these communities are excellent — they’re replete with all sorts of vital fragments you’ll need to make your projects successful. But putting all that knowledge together into a solution that applies to your particular situation can be a challenge. Often, community members assume other posters have some degree of knowledge; frequently, you might spend a considerable amount of time pulling together snippets from various posts, threads, and users (each of whom has a different programming style) to gain a complete picture.
- The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition is, first and foremost, a compilation of the best solutions provided to common PHP questions that turn up at the SitePoint Forums on a regular basis, combined with the experiences and insights our authors have gained from their many years of work with PHP.
- What makes this book a little different from others on PHP is that it steps away from a tutorial style, and instead focuses on the achievement of practical goals with a minimum of effort. To that extent, you should be able to use many of the solutions provided here in a plug-and-play manner, without having to read this book from cover to cover. To aid you in your endeavours, each section follows a consistent question-and-solution format. You should be able to scan the table of contents and flip straight to the solution to your problem.
- That said, threaded throughout these discussions is a hidden agenda. As well as solutions, this book aims to introduce you to techniques that can save you effort, and help you reduce the time it takes to complete and maintain your web-based PHP applications.
- Although it was originally conceived as a procedural programming language, in recent years PHP has proven increasingly successful as a language for the development of object oriented solutions. With the release of PHP 5, PHP gained a completely rewritten and more capable object model. This has been further reinforced by the fact that on July 13, 2007 the PHP development team made the end-of-life announcement for PHP 4.
- The object oriented paradigm seems to scare many PHP developers, and is often regarded as being off limits to all but the PHP gurus. What this book will show you is that you don’t need a computer science degree to take advantage of the object oriented features and class libraries available in PHP 5 today.
- The PHP Extension and Application Repository, known as PEAR (Link), provides a growing collection of reusable and well-maintained solutions for architectural problems (such as web form generation and validation) regularly encountered by PHP developers around the world. Wherever possible in the development of the solutions provided in this book, we’ve made use of freely available libraries that our authors have personally found handy, and which have saved them many hours of development.
- The emphasis this book places on taking advantage of reusable components to build your PHP web applications reflects another step away from the focus of many current PHP-related books. Although you won’t find extensive discussions of object oriented application design, reading The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition from cover to cover will, through a process of osmosis, help you take your PHP coding skills to the next level, setting you well on your way to constructing applications that can stand the test of time.
- The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition will equip you with the essentials with which you need to be confident when working the PHP engine, including a fast-paced primer on object oriented programming with PHP (see “What is OOP?” in Chapter 1). With that preparation out of the way, the book looks at solutions that could be applied to almost all PHP-based web applications, the essentials of which you may already know, but have yet to fully grasp.
Who Should Read This Book
- If you’ve already gotten your feet wet with PHP, perhaps having read "Yank (Kevin) - PHP & MySQL: Novice to Ninja", and completed your first project or two with PHP, then this is the book for you.
- If you’ve been asking questions like "How do I validate a web page form?”, “How do I add a watermark to my photos?”, or “How do I send automated email messages from my web application?”, you’ll find the answers to those questions in this book. If you have the drive to progress your skills or improve your web application through concepts such as reusable components, caching performance, or web services, then you will find this book to be an excellent primer.
pdf file from SitePoint; See Link (Defunct) (now links to "Yank (Kevin) - PHP & MySQL: Novice to Ninja"). Second Edition: October, 2007; February 2008 update
Text Colour Conventions (see disclaimer)
- Blue: Text by me; © Theo Todman, 2018
- Mauve: Text by correspondent(s) or other author(s); © the author(s)