How to Use Named Variables with Postgres and PHP PDO Driver
You can write reusable scripts with Postgres by taking advantage of named variables.
A named variable starts with a `:` in your sql script. Here is an example
You can then use this statement with `psql` and the `--variable` fl...
Written by Sean Behan on 11/11/2017
How to Generate a UUID in PHP 7
Here is a little snippet for generating a UUID in PHP 7
$data = random_bytes(16);
$data = chr(ord($data) & 0x0f | 0x40);
$data = chr(ord($data) & 0x3f | 0x80);
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_...
Written by Sean Behan on 10/26/2017
My Review of Moodle 1.9 Extension Development
I wrote a review for Joseph Thibault's Moodle News on extension development for Moodle. The book is quite good and I think an essential resource for anyone wanting to develop in Moodle. The book focuses on plugin development, but it will also give you an ...
Written by Sean Behan on 06/17/2012