Web Development

PHP Tutorials

I finally got around to patching and finishing Zend_Oauth’s Consumer implementation for the OAuth Core 1.0 Revision A specification. Once I had it finished, I used it to write a quick and simple interface to post some Tweets on Twitter while I was testing it out.

I find myself constantly bombared with questions from students and co-workers I’ve introduced to the Zend Framework regarding how the different components can come together to form a basic application. I’ve searched, I have found, I have emailed great tutorials, but still the most common questions are posed “What’s should I include in index.php?”, “Should I use Zend_Db_Table?”, “And what about Zend_Form?”

Client-side developers always had it easy – libraries such as jQuery and Prototype make finding elements on the page reliable and efficient. In PHP, regular expressions tend to get rather messy, DOM calls can be confusing and verbose, and often the string functions just aren’t enough. In this tutorial, I’ll show you how to use [...]

We recently looked at front-end testing of web applications with Selenium. Today, we’ll take another approach to testing your PHP applications: backend unit testing for your actual PHP code. As part of our posts on test driven development, here’s a quick intro to using SimpleTest to test your PHP applications. SimpleTest is a PHP unit [...]

As Ivo Jansch pointed out on the Ibuildings blog, there’s barely a month left till security fixes are discontinued for PHP 4. While support for PHP 4 officially ended last December, security updates were offered until 08-08-08. Most major web hosts have been phasing out PHP 4 support, but many legacy applications built with PHP [...]

Often you need solid metrics on the performance of your web application. Benchmarking your website can provide insight into which sections of your application might need major optimizations, and helps in dealing with scalability issues. Apache Bench, or ‘ab’, is a command line load testing utility which ships with Apache, and allows you to simulate [...]

Most PHP developers have at least heard of GD2; thanks to its prolific use in CAPTCHA generation, the image functions in PHP are standard practice for many. But the extension’s uses don’t end there. After the fold, here are eight cool things you probably weren’t aware could be done with GD2, and might be useful [...]

As PHP applications grow in size and complexity of structure, developers often find themselves putting together a “deployment plan” – that is, a set of steps to go through each time they want to take the code and package, deploy or test it. This process could involve creating some deployment-specific configuration files, packaging up the [...]

Webgrind is a web-based Xdebug profiling frontend for PHP similar to kcachegrind. Webgrind provides a simple PHP-powered interface for examining the output of XDebug’s profiling reports, for a quick and simply overview of the performance costs in various areas of your PHP application. One of the authors, Joakim Nygard, has posted a brief summary of [...]

ORM, or Object Relational Mapping, is a database design approach that simplifies managing complex databases for programmers. Instead of direct database access, an ORM layer in a PHP framework can make “objects” stored in a database behave like actual objects from a programming perspective – for example, creating a new “car” stored in the database [...]