Category Archives: PHP

I think YUI PHP Loader Still Sucks

Prelude: I love YUI and most everything Yahoo! does, and that’s why I’m exceptionally critical: PHP may not their forte. Have you tried the YUI PHP Loader? It’s provides the combo loading features that the YUI developed to reduce HTTP requests. There is only one problem: It sucks. It’s probably because it’s actually pretty old,

Faster Pages by Making Less Requests with Diet HTTP

We’ve been cooking up a new project called Diet HTTP, which are designed for use with PHP with support for Smarty. The idea here is to cut down on HTTP requests for .css and .js by serving the files in bundles instead of individually. This will improve your page load time by: Cutting down on HTTP requests,

Tip: Append to an array with + operator

You can use the addition and increment operators in PHP to concatenate arrays. For example, $c = $a + $b; If you’ve used array_merge() to do this in the past, it’s important to note the difference between merging arrays and concatenating them. When you merge they keys are used to determine how the resulting array

Tip: Don’t close your PHP tags

Adding a closing ?> to your <?php tags is actually optional, and you should avoid using it for scripts that will only be included.