Leon Chevalier's Blog: Improve website load time by 500% with 3 lines of code
502445
Leon Chevalier has posted about a class he's developed (you can download it here) that can help to speed up the load times for your site.   There are 4 relatively easy ways by which you can speed up the time it takes a browser to download a page. Following on from my post on joining CSS and JavaScript files, I have written a PHP script which will automatically do all of the above.   He gives example code of the class in action and includes some screenshots of the benchmarks from the YSlow Firefox extension showing the improvements.
740094
In his travels as a PHP developer, Jamie Wong has gathered some helpful debugging tips that are shared in this latest post to his blog.   Here are some bugfixing rules and tips Iâve learned working all these years with PHP. I emphasize mostly on fixing bugs than preventing them, which is another subject worth of its own article. Iâve moved to Rails, but I wanted to finish this post as a farewell and thanks to every article and documentation that was useful to me. Hope this is useful to you too.   Topics covered include:  Assume nothing Turn Error Reporting to show all errors Read the error message Understand the bug "Scooby-Bug, where are you?" Get as much information as possible  Each has some explanation below it and, in some places, a bit of code to clarify the point.
403472
Reinhold Weber has put together a list of signs (40 in all on his "programming list of shame") that you're a lousy PHP programmer. Here's a sampling:   don't see the need and/or benefits of a good programming IDE like Zend Studio or Eclipse PDT have never used some form of version control like Subclipse don't use a consistent methodology don't use test-driven development don't return content but echo or print it from your functions or classes return HTML, not data, strings, or objects. don't allow intelligent error handling you think reusable software equals/requires your code to be OOP   Now granted, some of them are a bit more high level than others, but if you're not headed towards a lot of these, you might change paths, hop out of that comfort zone and branch out into the community and the language a little bit more.
246639
In his continuing effort to redesign his blog, Shiflett.org, he's been working on one of the things that really makes a blog useful - the commenting system. Specifically, he wants site visitors to be able to add their own code listings to the comments they post. He gives more detail in this new post.   I've been playing with this tonight. Feel free to follow along as I go. The first thing you want to do is create an ordered list from the code you want to format ($code in these examples).   He gives an example of a listing using his system and explains how it all works. It's a mixture of:  PHP for parsing the data inside the 'code' tags CSS to correctly style the information, whitespace and all Some ini settings to set parameters for... ...the use of highlight string on the PHP code contents  A little str_replace magic later and you have list items styled as code blocks on your page. Check out his demo for an example.
737544
Over on Marco Tabini's Weblog today, there's a new posting that might hit close to home with quite a fe developers out there - a discussion on code documentation.
647066
DevShed has posted the second part of their (three part) series looking at the construction of a blogging application in PHP5. In this part, they look at how to handle the user's desire to input entries into the application via a HTML form.   In this second installment of the series, I'll show you how to expand the initial functionality of the already familiar "BlogProcessor" class so that it is capable of addressing all these (displaying all the entries, show the insert/update forms) issues.   They start with the simplest of the group - the displayBlogs method, outputting the full contents of the entries for the blog. Things get a bit tougher with the next step - creating the insert and update forms for pushing content into the database. Finally, they defined the header and footer functionality to make setting up the structure of the page simpler.
741179
Christian Wenz has pointed out an older post from Larry Wall talking about the line between scripting and programming languages (mentioning specifically PHP).  From the article "":  I think, to most people, scripting is a lot like obscenity. I can't define it, but I'll know it when I see it. [...] If I had to pick one metaphor, it'd be easy onramps. And a slow lane. Maybe even with some optional fast lanes.   Larry goes through tons of different older languages commenting on their viability in the online community including: Javascript, LISP, Pascal, Python, Ruby and PHP. He then looks at the present and what sorts of things are happening in languages these days. This list includes things like early binding/late binding, eager typology/lazy typology, limited structures/rich structures, class-based/prototype-based and transaction/reaction/dynamic scope.
656053
PHPKitchen has an interesting post covering one of the banes of most web developers existance - the "back button problem".
740071
A closer look at some behind-the-scenes tweaks for speeding up page loads, reducing memory drain and making the interface behave the way you want it to.
431145
On the "start up web 2.0" blog today, there's a set of benchmarks comparing two popular PHP frameworks - CakePHP and CodeIgniter - and how the fare in the standard "Hello World" sort of test.   After reading How fast is your framework I was rather intrigued to compare CakePHP and CodeIgniter. [...] Each framework is required to have the output "HelloWorld!" produced from a view and a controllers will obviously have to be created.   He ran the tests with the Apache benchmark tool (ab) and the simple code he provides with the results leaning towards CodeIgniter (by a good bit). Overall, it had a faster response time than CakePHP by about half.   Check out his results and grab the code and run it for yourself - see what kind of results you get and how they compare.
675185
In a new entry on his blog today, Marco Tabini introduces us to 5 PHP Performance Tips that we "probably don't want to hear".   I thought it might be interesting to write an article about the performance-enhancing tips you probably don't want to hear about - that is, those that are most likely to produce measurable (and durable) results but do require some effort on your part.   His list consists of:  You Don't Need To Plan Ahead In Order To Have A Plan Combat Database Abuse Do You Really Need A Database Anyway? Scale Horizontally Refactor To Scale Vertically  For each, he explains the title and gives a bit of validation to the point. There's some great mentions of tools that you can use to help accomplish them too - a profiler, the Lucene and Xapian full-text databases, and Lustre.
728399
New PostScript RIP gives designers more options in output formats.
732440
The International PHP Magazine has posted results from their latest PHP community poll as voted on by visitors to their site. The question for this poll asked developers what they thought, of the choices on the list, was the most common mistake that PHP developers make.   Coming in at number one by an overwhelming lead was "Not escaping entities and SQL input" (a definite problem indeed) with the next highest option, "Not using a Framework" a full twenty percent lower. The next two options were closer (descending) - "Using old PHP versions" and "No or little use of Object Orientation".   There's a new poll this week for your consideration - this time asking which stage, of the five options, should come first in the development cycle of a typical content management system. Head on over and cast your vote today!
299911
From Paul Jones' weblog today, there's a posting that more and more developers should live by - Document Your Project Already!
696609
On his blog, Stoyan Stefanov takes a look at using on of the most popular pieces of PHP forum software out there - phpBB - and optimizing the front-end.   During this short workshop there will be no changes to the phpBB code, we'll create a new template instead, so that in case something bad happens, your board will continue to work normally. As an example, I'll use the bgcanada.com/phpBB2, the board I volunteer to administrate.   The tutorial is broken up into sections:   The plan New subdomains Creating a new template Moving CSS to an external file, merging Copying files to the new subdomains Serving gzipped content Turning ETags off Expires header Sysadmin summary   It looks like a lot of steps, but each section is relatively short and written well so as not to have more information than needed. In the end you'll have a simple template that uses Yahoo's 14 optimization rules to make things work that much faster.
540441
Aaron Wormus is back today on the Zend Developer Zone with another in his "Hidden Gems" series. This time, he takes a look at the "Zend Plumbing", those bits of connective code that help you make your Zend Framework applications work.   The functionality that he covers in this article are some of the min parts that a lot of ZF coders use every day and might not know it:  the Zend class (providing a suite of helper methods) built in Wrapper functions:  loadFile loadClass loadInterface isReadable dump exception  the Zend registry  Each of these is briefly described with some sample code for the loadFile, loadClass, exceptions and the Registry to give you an idea of how to use it all. As always, you can check out the Zend Framework website for all the details on each of these functionality bits.
464596
PHP isn't exclusively for Web pages. You can use it like Perl for cron jobs and other tasks.