All blog posts tagged with php

XML Prolog in PHP

Posted January 5, 2012

Okay, I get it. For some PHP programmers, the notion of the PHP short-code being the same as the open and close of the XML prolog is enough to throw you into a foaming rage.

However - of all the "solutions" I've seen, this has to be the worst:

<?php echo ("<"); ?>?xml version="1.0" encoding="UTF-8"…

Read more

Lithium Filters - What's the Point?

Posted December 29, 2011

I've used Lithium for 2 projects now, and I have one major issue - I honestly don't see the benefit of "filters" vs. "callback" methods.

I understand that conceptually it's supposed to "decouple" the filter logic from the model itself. However, every example of applying filters to Models show the fi…

Read more

PHP Lithium

Posted December 16, 2011

Over the last week, I've been working in the PHP framework Lithium. I've actually been enjoying it.

I tried going via Zend, Symfony and CakePHP first, but found them either too fragmented (Symfony), quirky (hate the implicit connection CakePHP makes between controllers and models), or just weren't e…

Read more

One of the Biggest Lessons I've Learned in IT

Posted February 26, 2011

Something struck me today: over the years, I've been involved in a lot of different projects for a lot of different companies (even some just person projects). The #1 lesson I've learned is this - never exclude a particular technology from your choice of solutions merely because you don't like it (o…

Read more

Quick Rant

Posted July 10, 2010

Just a quick rant today - I've been trying to use Tomcat 6 + Hibernate Persistence using NetBeans IDE 6.9 and so far, I am seriously unimpressed. In fact, aside from the Java language (which I enjoy programming in), the whole Java servlets system seems to be a fairly large mess.

Here's an example wi…

Read more

Ubuntu 10.04 + PHP 5.3 + XMail

Posted June 28, 2010

If you install XMail on your Ubuntu 10.04 server, you will find that PHP won't be able to send mail out. You will repeatedly an error similar to this:

/var/lib/xmail/spool/temp/1277773767000.23491.p2198888.pubip.serverbeach.com: Permission denied

Don't bother with file permissions - they don't work.…

Read more

PHP JSONz

Posted May 28, 2010

At my place of work, much of the URLs we use internal to the system uses JSON-encoded objects which are BASE64 encoded in order to be able to use them as part of the path in a URL. The major advantage of this is that we can pass huge amounts of arguments with meaningful names a lot easier than using…

Read more

Function Aliasing in PHP

Posted May 20, 2010

One question I've asked myself and I see asked on sites such as stackoverflow.com is if PHP is able to have "aliases" for functions. The answer is either, "no, you have to use a wrapper function" or to the more extreme "you can write an extension".

Since I'm one of those PHP developers who doesn't t…

Read more

Class Proxy in PHP

Posted May 14, 2010

One of the nice things with PHP is that if you include a file from within a class method, that included file can use "$this" to access the class which included it. Very handy.

However, today I wanted to make it even easier - I wanted the loading of content to exist in a separate class, but I still w…

Read more

A Case of PHP Annotations

Posted May 7, 2010

I recently had the need for a simple ORM layer for a custom CMS framework I work in. I didn't want the typical huge ORM, such as Doctrine - just something small and simple.

Coming from a J2EE background, I learned to like annotations and wanted my PHP ORM to be similar. After searching (unsuccessful…

Read more

The Peculiar Nature of PHP

Posted April 19, 2010

PHP has obviously been around for a while. Not quite as long as C, but by all accounts around 1995, the same year as Ruby and Java. And yet, I find it one of the most peculiar languages with regards to how people (those core to the language itself, as well as users) have developed using such a diver…

Read more

PHP "Eval is Evil"

Posted April 7, 2010

I keep seeing something which is beginning to annoy me - I keep seeing all these forum and blog comments saying how terrible PHP's "eval" instruction is, and how there is no reason what-so-ever to use it.

I wish people would keep their opinions to themselves simply when they cannot think of an insta…

Read more

PHP 5.3

Posted February 25, 2010

This post is a bit of a b*tch-fest, so please excuse me. I really do hate to be one of "those" guys who whines about something in Open Source without contributing directly to the project in question, but I just have to on this one.

As you can guess from the title, in project in question in PHP, and …

Read more

PHP quirk with inline "if"

Posted January 22, 2010

Today, I discovered an interest quirk in PHP 5. I needed to set a single value based on various possible string values. For whatever reason, I decided a big set of "if/elseif" statements wouldn't do, and a switch would be overkill for simply setting a single value. What I tried to do was use in inli…

Read more

Throwing Down the Gauntlet

Posted August 8, 2009

I'm throwing down the gauntlet to other language/app developers. For my place of work, I developed a Java Applet for uploading multiple files to a server. Sure, you can do this with other technologies to a certain degree (selecting multiple files at once in Web 2.0 isn't really possible, is it?) but…

Read more

Why I Admire PHP

Posted July 13, 2009

I finally decided today that even if I may not like PHP, I certainly admire it. It's etched out a very good business for itself, and continues to flourish, despite calls of it's demise at the hands of Ruby (much like the calls of demise of Java).

One of the things I admire about it is that it doesn'…

Read more

Displaying all 16 posts

Visit my Friends and Family

If you've enjoyed my site, please take a moment to visit my friends and family, many of whom have some interesting insights, and entertaining thoughts and ideas.