Extensive PHP Articles, Resources and Links

Wednesday, June 02, 2004

Don't use a regex if you don't have to
PHP has a rich set of string manipulation functions - use them!


BAD: $new = ereg_replace("-","_",$str);
GOOD: $new = str_replace("-","_",$str);
BAD: preg_match('/(\..*?)$/',$str,$reg);
GOOD: substr($str,strrpos($str,'.'));

A HOWTO on Optimizing PHP


PHP is a very fast programming language, but there is more to optimizing PHP than just speed of code execution.
In this chapter, we explain why optimizing PHP involves many factors which are not code related, and why tuning PHP requires an understanding of how PHP performs in relation to all the other subsystems on your server, and then identifying bottlenecks caused by these subsystems and fixing them. We also cover how to tune and optimize your PHP scripts so they run even faster.[More...]

The Best Tool For The Job: Object Oriented Versus Procedural Programming in PHP


This tutorial is intended for novice and journeyman PHP programmers who want to learn more about the issues surrounding object oriented versus procedural programming in PHP.
A working knowledge of PHP and a basic familiarity with classes is assumed.
Awesome tutorial [Master it all...]

Zend's PHP 5 Competition has Started!


Participate and win Dell Laptop and Mac ipod Mp3 Player [More...]