Functions Type Hinting and Void Functions in PHP 7

Overview

Since PHP5 functions had the ability to accept arrays and classes as parameter types. Now PHP 7 expands that list to bool, float, int, string. You can also set types for the return values, and allow for these values to accept a null value. Finally you can set a function as void which will prevent it from returning a value.

Continue reading “Functions Type Hinting and Void Functions in PHP 7”

PHP POST Form Inputs – Multidimensional Arrays

In PHP it is common to have form inputs with the same name. Many times these will be generated dynamically (i.e. a WordPress Repeatable Custom Meta Field). PHP stores these values to the POST Superglobal as a multidimensional array. To begin with, run this example script here PHP Form Inputs Example.

Continue reading “PHP POST Form Inputs – Multidimensional Arrays”

Securing an Apache Virtual Site with a Self Signed Certificate

This article follows the dev virtual site which can be viewed here. In that tutorial we created a virtual site called new site. The site we created was http meaning the packets are sent unencrypted. This means passwords and other data sent will be viewable to others on the network. A password to log into a content management system can easily be sniffed out. We can prevent this from happening by using a self signed TLS certificate, which will encrypt our traffic.

Continue reading “Securing an Apache Virtual Site with a Self Signed Certificate”

How to Set Up Apache Virtual Hosts for Development on Ubuntu

There are a many tutorials that explain how to set up virtual hosts for a production server on Apache. It’s not that different for a development enviornment, but there aren’t very many tutorials on how to do this.

Continue reading “How to Set Up Apache Virtual Hosts for Development on Ubuntu”

WordPress Ajax Autocomplete with Custom Post Types and Meta Fields

Setup

WordPress Ajax Autocomplete works essentially the same as it does when you are creating a site from scratch. You create a list of terms in JSON format and provide those as a source. There are two main differences with WordPress Ajax Autocomplete and building from scratch:

Continue reading “WordPress Ajax Autocomplete with Custom Post Types and Meta Fields”

Diatonic Chordal Modal Theory – The Modes

When I was learning guitar this thing called the modes kept popping up. It became something I tried to understand repeatedly. I asked a couple of different teachers and nothing clicked until I met John Banks. John taught me when I had decided to go to school for music. Last minute was an understatement…I decided that’s what I would do and I put my mind to it.

Continue reading “Diatonic Chordal Modal Theory – The Modes”