Conference News & Coverage
Sponsors

Diamond Sponsors

  • Fotango
  • Intel
  • Microsoft

Gold Sponsors

  • Dell Inc.
  • Hewlett Packard
  • IBM
  • Mozilla Corporation

Silver Sponsors

  • ActiveState
  • Autodesk
  • Google
  • Greenplum
  • Ingres
  • Novell, Inc.
  • NYTimes.com
  • OpSource
  • Rearden Commerce
  • SnapLogic
  • ThoughtWorks
  • Ticketmaster

Sponsors & Exhibitors

For information on exhibition and sponsorship opportunities at the convention, contact Sharon Cordesse

For Media Partnership opportunities, please contact Avila Reese

Download the OSCON Sponsor/Exhibitor Prospectus (PDF).

Conference News

To stay abreast of Conference news and to receive email notification when registration opens, please sign up here.

Press & Media

For media-related inquiries, contact Dawn Applegate at

Program Ideas

Drop us a line at and tell us who and/or what would make OSCON a must-attend event.

User Groups & Professional Associations

For user group and professional association related inquiries, contact Marsee Henon at

Session

Improving Performance by Profiling PHP Applications

Patrick Reilly, Senior Developer, OmniTI Computer Consulting

Track: PHP
Date: Wednesday, July 25
Time: 5:20pm - 6:05pm
Location: Portland 255

One of the best things about programming in PHP is how easy it is to learn the language.

Everything fits together and the online documentation informs PHP users of the functions and parameters needed to perform a specific task, even not knowing much about the function that you need to use. A lot of times you will just need specific functionality and be surprised that the language has that specific feature, (e.g., converting logical Hebrew text to visual text with newline conversion using the hebrevc function.)

All of this is very nice, but it takes a little while to get to know PHP's subtle nuances; especially those related to PHP performance and memory consumption. There are lots of subtle things in PHP that can save a lot of memory and give a small extra boost in performance. This session will serve as an introduction to profiling PHP applications, and to making changes to a script and comparing the values of the optimizations based on real-world performance characteristics.

To quote the dictionary, a profile is a formal summary or analysis of data, often in the form of a graph or table, representing distinctive features or characteristics.

A number of different tools have been developed to help with PHP performance profiling, including Benchmark (a PEAR project), DBG, Xdebug and Advanced PHP Debugger (another PEAR project).

If you're really serious about squeezing every last cycle out of your code-base, you should investigate all the benchmarking tools available - because they work in different ways and allow you to extract different kinds of valuable information. For now, however, we are going to concentrate on "the Advanced PHP Debugger" (APD).

APD is a debugger written in ANSI C by George Schlossnagle and Daniel Cowgill; APD loads as an extension to the Zend Engine. It works by hooking into the Zend internals and intercepting PHP function calls, allowing it to do things like measure function execution time, count function calls, as well as perform stack backtraces.

This data can be used to discover bottlenecks and other areas that can be optimized to improve the program's performance.

At this point we will assume you have APD installed on your webserver, along with all the other needed software: Apache, MySQL, and your PHP scripts themselves; to create examples of profiling scenarios, as this is the easiest and most compatible way to analyze your current code-base.