PHP 5.5.0 alpha 1
PHP 5.5.0 alpha 1 was released a few days ago. New features include: support for Generators, a new password hashing API, support for finally in try/catch blocks, support for list() in foreach, constant...
View ArticleGuzzle — PHP HTTP Client
Guzzle is a framework that includes the tools needed to create a robust web service client, including: Service descriptions for defining the inputs and outputs of an API, resource iterators for...
View ArticleComposer – Dependency Manager for PHP
Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Think npm install but then...
View ArticlePHP TokenPhrase Generator
Based up on this TokenPhrase Ruby Gem I decided to quickly write a PHP variant of it. With it, one can generate unique phrases for you to use in your app as tokens. <?php require_once __DIR__ ....
View ArticleSilex $app['autoloader']->registerNamespace() deprecated
The past few days I’ve been playing around with Silex, a micro PHP Framework. At a certain point I got stuck in the process when using a custom controller: the darn class just wouldn’t load and the...
View ArticleÉvénement — PHP Event Dispatcher
Événement is a very simple event dispatching library for PHP. It has the same design goals as Silex and Pimple, to empower the user while staying concise and simple. Concise indeed. At the core it’s a...
View ArticleSilex Code Fiddles/Examples
For the course Webscripting2 I’m lecturing at ikdoeict.be/KaHo Sint-Lieven, we’re working with Silex. Next to the slidedeck explaining Silex, all examples are freely available on GitHub (links at the...
View Articlebramus/router — A lightweight and simple object oriented PHP Router
For one of the courses I teach I was in need of a PHP Router. Having explored the available routers out there I found they either were: Outdated Not object oriented(sorry Klein) Rather bad at the...
View ArticlePHP PaaS
Great to see that Google App Engine and Engine Yard now both support PHP (v5.4) on their cloud platforms too. GAE could use some more loaded extensions, but it’s a good start. Google App Engine for...
View Articlelessphp
LESS Compiler written in PHP. Usage is simple: <?php require "lessc.inc.php"; $less = new lessc; echo $less->compile(".block { padding: 3 + 4px }"); Of course one can take files as input too...
View Articlebramus/router Updates
It’s been 4 months since I released bramus/router, the lightweight and object oriented PHP Router I wrote. Since then a few new features worth mentioning were added. Subrouting Support It’s now...
View ArticleWordPress < 3.6.1 PHP Object Injection
WordPress 3.6.1 contains a PHP Object Injection Vulnerability Fix, detected by one of my former students. He also made an extensive writeup about it: Let’s recap:...
View ArticlePuPHPet – A simple GUI to set up virtual machines for PHP development
PuPHPet is a GUI configurator for the Vagrant automation tool. It uses Puppet as the provisioning backend. PuPHPet →
View ArticlePHP is meant to die
PHP is meant to die. It doesn’t mean that it will disappear into nothingness, it just means that your PHP code can’t run forever; The core PHP feature follows the most simple programming workflow: get...
View ArticleRun a PHP script as a service/daemon using start-stop-daemon
In a recent project I needed to permanently run a PHP CLI script; it needed to run as a service/daemon. A few Google search coupons later I got my answer: use start-stop-daemon to make it work. To not...
View ArticleUsing ConsoleServiceProvider with Silex
use Knp\Provider\ConsoleServiceProvider; $app->register(new ConsoleServiceProvider(), array( 'console.name' => 'ConsoleApp', 'console.version' => '1.0.0', 'console.project_directory' =>...
View ArticlePHP Augmented Types
/** * @param int $a * @return float[] */ function foo ($a) { echo "You passed in the integer $a"; return [$a * 1.0, $a * 2.718]; } Augmented Types simply provides a way of enforcing argument and return...
View ArticleReact-PHP-V8Js
// the library $react_source = file_get_contents('/path/to/build/react.js'); // all custom code concatenated $app_source = file_get_contents('/path/to/custom/components.js'); $rjs = new...
View ArticleGetting ready for PHP 5.6
PHP 5.6.0, currently in alpha, will hit us any time later this year. Time to take a look and see what’s new. Here’s a selection of features that will affect the way you and I code. New __debugInfo()...
View ArticlePHPloy – Git FTP Deployment
; This is a sample deploy.ini file. ; You can specify as many servers as you need ; and use whichever configuration way you like. [staging] user = example pass = password host = staging-example.com...
View Article