PHP, Redis, and You!

Posted by & filed under NoSQL, PHP, Redis.

Here’s the code and notes for a presentation I’m giving this Saturday on PHP and Redis: Even if you’re not going to presentation, feel free to check it out and give it a try. Redis is pretty simple to use and quite powerful once you get the hang of it.

Why PHP 5.4 is so much better than PHP 5.3

Posted by & filed under PHP.

<?php $raw_header = “http://location/\r\nBadHeader”; # PHP 5.4: $clean_header = explode(“\n”, explode(“\r”, $raw_header)[0])[0]); # PHP 5.3: $no_cr = explode(“\r”, $raw_header); $no_nl = explode(“\n”, $no_cr[0]); $clean_header = $no_nl[0]; unset($no_cr, $no_nl); echo $clean_header;

Safely Parse Complex Objects and Arrays in PHP

Posted by & filed under PHP.

<?php /** * This class will safely parse complex objects or arrays with possible missing keys * * Usage: obj::query($obj, ‘dot.separated.syntax’); */ class obj { /** * Parse the provided object * * @param $object mixed The complex object you’re going to parse * @param $path string The dot separated path you would like to… Read more »

WordPress GET Variables with lighttpd

Posted by & filed under PHP, Web Server.

Due to RAM restrictions on various servers I’ve had to use, I learned to axe Apache a long time ago. I’ve replaced it with lighttpd, although I’ll probably be transitioning over to nginx sooner or later (it’s what we use at work, and seems to be even lighter in the memory consumption department). Therefor, all… Read more »

SleekMVC, my PHP Framework, gets Routing support

Posted by & filed under PHP.

Back when I was teaching a PHP/MySQL meetup, I wanted to get my members to use a PHP MVC framework, one that had new PHP 5.3 features at the time (such as namespacing), as well as other good PHP 5 features (like autoloading). The framework had to be so easy to use that the codebase… Read more »

MVC versus Flat PHP

Posted by & filed under PHP.

The Symfony2 Book has an excellent page about MVC versus Flat PHP. It’s made by the Symfony folks, but it is a framework-agnostic discussion, showing an evolution from one approach to the other.

CouchDB and PHP Web Development

Posted by & filed under NoSQL, PHP, Reviews.

I recently got my hands on the book CouchDB and PHP Web Development: Beginner’s Guide, written by Tim Juravich and published by Packt. This book aims to provide the reader with enough information to build their own website powered by PHP and using the CouchDB, a NoSQL database. CouchDB and PHP Web Development Beginner’s Guide on Packt… Read more »