Posts Tagged php

Your mileage may vary

It’s always fun to read articles with tips and tricks by other developers and see how they figure “best practices” are handled. Most developers do seem to thing they observations and practices are easily adopted by anyone, and should be accepted without any argumentation or reasoning behind the advice.
One of the nice examples of this, [...]

Tags: , ,

PHP Dynamic Caching with ZendPlatform

I recently had a little fun playing with the dynamic cache available in the Zend Platform. The Zend Platform is a commercial product, which provides a number of cool professional features to a PHP setup – one of these is the option to do dynamic caching.
With dynamic caching you can cache the output of a [...]

Tags: , , , ,

Loading data from a file with PHP

In programming languages common tasks should be easy, and surprisingly often I find my self loading data from some source file into a database. With PHP loading a CSV file into the database – or posting the data to an API – is quite easy.
The only trick is to know the functions file_get_contents, split (and [...]

Tags: , , ,

PHP: Removing an item from an array

If you have a php array, but need to nuke an item from it, the unset function is just the tool to do that. When iterating through the array after removing the item, you should be slightly careful.
The unset function does remove the item, but it doesn’t “reindex” the array, so you should traverse the [...]

Tags: , ,

PHP4 – Game over

Yesterday PHP 4.4.9 was released, and today PHP 4 is officially dead. There wil be no more updates.
Don’t worry too much tough. PHP 5 is far superior and there’s absolutely no go reason not to have moved on to PHP 5 long ago.
PHP 4 – It was a nice ride and I’m sure you deserve [...]

Tags: ,

ZendStudio for Eclipse

For professional PHP development, nothing beats ZendStudio in my book. Currently ZendStudio is in the process of moving from a standalone application to something build on
top of Eclipse. I’m sure it might be a wise move on the long term, but there are a few things bugging me with th current version. The number one [...]

Tags: , , ,

PHP4 RIP

In less than 3 months – on August 8th, 2008 – PHP4 reaches end of life. If you still haven’t updated, it’s damn well time to get migration started. PHP5 far better than the previous versions, and if it’s good enough for Yahoo, Facebook and many other huge sites, it’ll probably be a joyride for [...]

Tags: ,

PHP Coding Standards

If you’re part of a larger team developing (and sharing) code, it is a pretty good idea to have some common standards. In the PHP work, such a set of common standards include the PEAR Coding Standards. While it may be a challenge to agree on standards, it can be done – the hard part [...]

Tags: , , ,

How do you know good code?

One of the great challenges of PHP is that it’s so easy to learn, that just about anyone can learn it with not too much of an effort. While this is great for the number of PHP developers, it also seems to have the effect, that there is a huge number of bad examples of [...]

Tags: ,

Syntax checking PHP on the commandline

I’m sure most people only thing of PHP as a Weblanguage due to be called through a browser. It has however since version 4.3.0 also been possible to use PHP on the commandline – as you do with Perl, Shell scripts and likewise. If you’re using Linux (or an other Unix-like operating system – [...]

Tags: