Category Archives: PHP


Writing static typed style code in dynamic type language

I am not sure who else is doing this but I have a static typed language background and I tend to write code in static type style. Don’t assign different value types to the same variable Let’s see what dynamic type in the simplest form in Python:

While this is perfectly legitimate, but it’s… Read More »

PHP developers should try Python.

PHP and Python both are dynamic typed language, so there is no point the discuss anything related in this aspect. Exception is first class citizen

Prints ‘Caught’ Let’s look at PHP:

Better functions Imagine you can write functions like this

Short-lived vs Long-lived Almost all PHP scripts are short-lived, including most frameworks, which… Read More »

Laravel for Django developers, part 1

Project Structure After setting up the quickstart project, I feel the project structure is quite different to Django. In Django a lot of code are organised in “app” domain, but it seems to me that multi-app is not something out-of-the-box in Laravel: Instead, it seems the apps in Django is more similar to the… Read More »

Laravel for Django Developers, prelude.

Reality is a b**ch, Python/Django jobs are scarce in New Zealand, despite how awesome the framework it is, managers and architects still choose PHP frameworks such as Silverstripe over Django, besides, Silverstripe is a CMS, not a framework. After 5 years of dedication to Django framework, I struggle to find Django jobs in New Zealand.… Read More »

PHP Snippet: Get dates from a given range


Category: PHP

PHP Tutorial: Server load bar chart

Server Load: Just a quick tutorial on drawing the server load bar chart in php: serverload.php


Category: PHP

My dokuwiki plugins

A while ago I wrote some dokuwiki plugins: User Home Page Auto Include Index Table Math Modal Popup ACL Made Easy

Category: PHP

How do you rotate a two dimensional array? This is the best so far I have come up with PHP, can anyone refine this for me??

Category: PHP