Controlling PHP Output: Caching and compressing dynamic pages
26063Controlling PHP Output: Caching and compressing dynamic pageshttp://www.phpbuilder.com/columns/argerich20010125.php3mod_gzip is an Apache module which compresses static html pages using Gzip, according to IETF standards for browsers that accept gzip enconding (IE, Netscape, etc). mod_gzip may accelerate the download time for pages 4/5 times and I strongly suggest you use mod_gzip in your webserver. However, due to a lack of a filtering mechanism between modules in Apache 1.x.x, there is no way to compress PHP generated output using mod_gzip. Therefore, we have to build our own compressing engine in PHP. In this article, I will explain how to use PHP output controlling functions to make your pages load FAST!PHP > Tips and Tutorials > DevelopmentOct 15, 2006
The PHP Manual defines an array in PHP as an ordered map. Personally, I don't like this definition. I will define an array in PHP as a collection of variables, which I think is a little more descriptive. In most languages, at least the ones I am familiar with, the variables in this collection must all be of the same type. Not so in PHP! This is because of PHP's Type Juggling. I'm not going to go into great detail about Type Juggling, but basically it means that you don't declare a variable as a certain type. The context in which the variable is used determines its type.
Web developers who wish to use their time as efficiently as possible, should consider using an integrated development environment (IDE), if they are not already doing so. Just as the name suggests, a typical IDE provides the developer with an integrated suite of programming products, including an editor with multi-file editing, multiple undo and redo, local and global search and replace, stream and paragraph text selection, code-folding, multi-line tabbing, automatic creation and coloring of matching braces, intelligent indenting and outdenting of code, and more.
Templates provide a simple means to seperate server side code from client side code in our scripts. This article looks at when template systems are useful, their shortcomings and why template engines are a bad idea.
In-function caching can be used to greatly improve the performance of our software. Applying this technique effectively is important to avoid spiraling memory usage and bizarre bugs that can be caused by old cache data lingering around.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.