Here is an example of how to create type safe lists in PHP 7. Influenced by Java Generics, this approach lets your code guarantee the type of data you can store and retrieve from arrays.
Continue reading PHP 7 Type Safe Arrays
PHP 7 introduces scalar type definitions: your function parameters can be of a given type, and function return type declarations ensuring your function will return results of a given data type. This can increase your code quality by enforcing a specific behaviour of your code, almost similar to how a strongly typed language does. However, PHP does not yet support variable or property data types – leaving the possibility of variables and properties to be unpredictably converted from one type to another within type safe functions. Below is a technique that enables you to guarantee object properties will always be of a given type.
Continue reading PHP 7 Object Properties Type Safety with Setters and Getters
These are my notes on how to install a D Programming Language compiler along with it’s package management tool Dub and how to set-up a first “Hello World” project on a Raspberry PI running Raspbian.
Continue reading D Programming Language – How To Install on Raspberry Pi 3
Below is a quick overview of each CodeIgniter folder, starting from the repository root.
Continue reading CodeIgniter folder structure overview
Below is a minimal step by step guide on installing CodeIgniter 2.1.4. The assumptions are that your using either Ubuntu or Debian, with a GIT + Apache + PHP + MySQL stack available.
Continue reading Installing CodeIgniter – Step by step guide
This entry describes the Symfony2 directory structure; providing a broad understanding of how a project is structured, and laying the ground for file system level security and customization.
Continue reading Symfony2: Folder Structure
This post marks the start of a series of Symfony2 focused entries, describing how to install Symfony2 and prepare the environment for a new project. Relying on the "Installing and Configuring Symfony" chapter of the Symfony Book, this entry provides details about choosing the right version, and an introduction to composer; followed by step by step install instructions.
Continue reading Symfony2: Version and Install Steps
Classic AJAX requests are limited to the same domain. JSON with padding allows us to make requests to different domains. Below is an example of how to create a jsonP class, and handle requests using PHP.