News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

DevShed:
Using Timers to Benchmark PHP Applications
0 comments :: posted Wednesday April 30, 2008 @ 14:31:08
voice your opinion now!

DevShed has posted the second article in their series looking at benchmarking your PHP scripts. This time they look at the use of "timers" to check on script execution length.

Since you already know how to create timer functions and classes, in this tutorial, I'll create some concrete examples that show where these timing mechanisms can be applied in order to evaluate the performance of certain PHP applications.

They create a few classes that connect to a database and pull out rows (handing it off to a Result class). They use these classes in two examples - one with compression (output buffering) and one without using their Timer class to evaluate the differences.

tagged with: timer benchmark application tutorial class mysql row output buffering


PHPit.net:
Having fun with PHP's output buffer
0 comments :: posted Monday April 17, 2006 @ 07:13:24
voice your opinion now!

One of the more powerful and handy features that PHP offers is output buffering. It allows you more control over when the client's browser gets the information instead of just spewing information at random. It is a little tricky to get the hang of, so PHPit.net has put together this new tutorial on how to get started.

I'm sure most of us have come across the dreaded "Cannot modify header information - headers already sent", and this is usually caused when your script tries to send a header or set a cookie, when it's already sent output. The easiest fix is to make sure no output has been sent, but it's also possible to enable something called output buffering which also solves the problem.

In this article I'll first show you how output buffering works, and take you through most of its basic functions. After that we'll have a look at what's possible with output buffering, and show you some neat tricks.

The groundwork is laid first, giving a simple "Hello world" example to show how the code flows. They show how the buffering system works and how to use a callback function to modify the contents of the buffer before outputting (including a full replace function to text within the buffer from an array). They follow that with a look at creating your own HTML tags and using the gzip compression functionality to speed up your pages.

tagged with: php output buffering example tutorial simple callback replace gzip php output buffering example tutorial simple callback replace gzip


developer database zend job book framework PHP5 application release releases security zendframework PEAR conference package mysql ajax cakephp code pecl

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework