php

Loosely Typed Code Deserves Triple Equality

1 minute read

In loosely typed languages such as JavaScript or PHP, using == to compare values is bad practice because it doesn't account for type, hence false == 0 == '' ...

Reverse a Multibyte String in PHP

1 minute read

PHP's strrev is not safe to use on utf-8 strings because it reverses a string one byte at a time. So if a character consists of multiple bytes it cannot be p...

Revisiting Spaces and Tabs

5 minute read

This article in 50 words: I used to prefer spaces vs tabs, now I don't care so much, think it's more important that you can easily switch on a per-project ba...

Notes on Dutch PHP Conference 2010

8 minute read

Here the notes I took during the Dutch PHP conference 2010 (#dpc10). They're not a representative summary of the event's highlights cause I could only attend...

Redis PHP Introduction

4 minute read

Don't know Redis? Think Memcache, with support for for lists, and disk-based storage. You can use Redis as a database, queue, cache server or all of those c...

CakePHP and Nginx

4 minute read

I still got sites running Apache, but all new projects are launched with Nginx. I don't need many of the features that Apache offers, and the speed gain of N...

CakePHP REST Plugin Presentation

1 minute read

At our company we have a lot of uses for a solid API. We can use it to distribute config files, have servers report in, let customers edit DNS records using ...

Run Node.js as a Service on Ubuntu

3 minute read

The core of our new project runs on Node.js. With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your pr...

Prepare for PHP 5.3

4 minute read

PHP 5.3 is a big leap forward for PHP and brings of a lot of neat features. However, big leaps can also mean big changes and potentially big breakage when it...

Notes on CakeFest 3

4 minute read

Looking back at a great CakeFest in Berlin, I learned a lot about CakePHP and met many nice and inspiring people. Here are some conference notes I took that ...

Improve MySQL Insert Performance

11 minute read

Sometimes MySQL needs to work hard. I've been working on an import script that fires a lot of INSERTs. Normally our database server handles 1,000 inserts / s...

A DRY Piece of Cake

6 minute read

So I've been learning CakePHP the last few days. Bit by bit I've been trying to port a lecagy admininistration app to Cake. 'Secretly' linking menuitems to f...

Create Daemons in PHP

11 minute read

Everyone knows PHP can be used to create websites. But it can also be used to create desktop applications and commandline tools. And now with a class called ...

PEAR Coding Standards Changed!

3 minute read

In another article I've told you about how I would like to see one rule removed from the PEAR Coding Standards. This rule would allow developers a bit more f...

PEAR Coding Standards Change?

3 minute read

Since a couple of months now, I've been involved with PEAR as a contributor. Contributing to PEAR means adhering to the PEAR Coding Standards. Their standard...

Enhance PHP Session Management

6 minute read

In PHP, sessions can keep track of authenticated in users. They are an essential building block in today's websites with big communities and a lot of user ac...

Class 'Imagick' Not Found

less than 1 minute read

I tried to do some Image Magick with PHP recently on an Ubuntu Feisty machine, and even though I had the required package: 'php5-imagick' installed, and I up...

PHP: tiff2pdf

4 minute read

Or: How to convert multipage TIFF to PDF in PHP.

Convert Anything to Tree Structures in PHP

6 minute read

I recently faced a programming challenge that almost broke my brain. I needed to create a function that could explode any single-dimensional array into a ful...

Survive Heavy Traffic With Your Webserver

7 minute read

Recently two of my articles reached the Digg frontpage at the same day. My web server isn't state of the art and it had to handle gigantic amounts of traffic...

Speedup Your Website With Cache_Lite

2 minute read

Every time a request hits your server, PHP has to do a lot of processing, all of your code has to be compiled & executed for every single visit. Even tho...

Make SSH Connections With PHP

6 minute read

Not everyone knows about PHP's capabilities of making SSH connections and executing remote commands, but it can be very useful. I've been using it a lot in P...