Tag: php
-
Using PHP closures with the observer pattern
PHP 5.3 introduced the concept of anonymous functions, often called closures. These have been present in languages like JavaScript for a long time, and have been incorporated into PHP as part of its ongoing transformation into a first-class web programming language. Simply put, they allow you to assign the workings of a function to a […]
-
More secure password hashing in PHP 5.5
The most recent set of PHP releases suggest that the core development team are serious about keeping PHP at the forefront of web development technology, and addressing some of its legacy criticisms. I’ve previously talked about the JsonSerializable interface; now, PHP 5.5 is introducing an easier way to make password hashing more secure. (What is […]
-
Serializing PHP objects into JSON with JsonSerializable
JSON (JavaScript Object Notation) is a handy data interchange format that’s overtaken XML in a very short time for a lot of API use cases – and rightly so. It’s easy to use, bandwidth efficient, and widely supported across platforms and languages. PHP is still one of the most widely-used web scripting languages. It’s perhaps […]
-
Bonita: a PHP template manager with lofty ambitions
I’m fed up of using the same PHP template pattern over and over in my web apps, so I decided to write it from scratch and iterate on some core ideas. And then open source it under an Apache 2.0 license. The result is Bonita: a simple PHP templating engine. It’s definitely version 0.1, but […]