The Splat Operator In PHP

The PHP splat operator (...) has been available in PHP since version 5.6. When it was introduced I made note of it but have never really used it, so I thought it might be interesting to explore it a little.

Internally, the ellipsis operator in PHP is called T_ELLIPSIS, although I have heard a few different names for the operator in the past. This includes names like:

philipnorton42 Wed, 08/05/2020 - 13:37
Using PDO To Create A Data Access Object

A Data Access Object (DAO) is a way of taking data out of a database or API and present it in a unified way across your application. As a design pattern this has uses in standardising how a particular bit of data is passed around, without having to resort to using arrays to accomplish the same job.

philipnorton42 Tue, 08/04/2020 - 12:03
Drupal 8: Automated Spam Protection

Spam is a constant problem for any site on the internet that has a publicly available form, but automatically preventing spam can be tricky. The idea is to prevent the automated spam bot from being able to submit data to your site, but not at the detriment of the users. There is a careful balance between preventing spam and prevent real content being submitted by real users. Manually moderating blog comments is usually a good idea, but many websites contain contact forms and user registration forms that are often targeted by spam bots.

philipnorton42 Fri, 07/24/2020 - 15:29
Inspecting And Reusing jQuery Events

Adding events to HTML elements with jQuery is pretty simple, but I found that extending those events wasn't an easy task. I was faced with an issue where I had some third party code that performed an action on an element, and I needed to add an event and call the same handler from that event. As this was within a CMS I had limited scope to just add my new event to the existing code, so I needed a way of pulling out the current jQuery events and then calling that event handler separately. This post looks at how I accomplished this.

philipnorton42 Sun, 07/19/2020 - 18:30
PHP:CSI Get Price In Pence

I was looking at some malfunctioning code the other day where the price was pulled out of one API service and sent to another API. The problem stemmed from the fact that the value coming out of the first API was as a string and the second API required the price in pence as an integer.

The difference in formats here meant that the number had to be converted from one format to another. During this process it was found that the value was sometimes out by a single pence.

philipnorton42 Fri, 07/17/2020 - 17:51

Keychron K2 Wireless Mechanical Keyboard: A Review

13th July 2020
I (like a lot of other people) recently started to work at home a lot more, and with a permanent desk setup at home I wanted a decent keyboard to work with. My work machine is a MacBook Pro 2018 and I dislike the keyboard quite a lot. It feels 'poppy', has some interesting key placements (the up and down arrows in particular), has no escape key or function keys at all.
Drupal PaaS Hosting Review: Dropsolid

Continuing my review of some Drupal PaaS hosting platforms I am taking a look at Dropsolid.

What I'm not doing is a massive deep dive on all platforms. Ultimately, your milage will vary and what you get out of these platforms will be different for most people. You will know the requirements of your project and what you need to accomplish.

Also, if you want to know more about a platform, then please contact them directly. I'm sure they will be happy to hear from you.

philipnorton42 Mon, 07/13/2020 - 09:29
Drupal PaaS Hosting Review: Platform.sh

Continuing my review of some Drupal PaaS hosting platforms I am taking a look at Platform.sh.

What I'm not doing is a massive deep dive on all platforms. Ultimately, your milage will vary and what you get out of these platforms will be different for most people. You will know the requirements of your project and what you need to accomplish.

Also, if you want to know more about a platform, then please contact them directly. I'm sure they will be happy to hear from you.

philipnorton42 Fri, 07/10/2020 - 18:18
Drupal PaaS Hosting Review: Pantheon

Continuing my review of some Drupal PaaS hosting platforms I am taking a look at Pantheon.

What I'm not doing is a massive deep dive on all platforms. Ultimately, your milage will vary and what you get out of these platforms will be different for most people. You will know the requirements of your project and what you need to accomplish.

Also, if you want to know more about a platform, then please contact them directly. I'm sure they will be happy to hear from you.

philipnorton42 Wed, 07/08/2020 - 20:57
Drupal PaaS Hosting Review: Acquia
I've been looking at Drupal hosting solutions recently, and after trying a few I thought I would write a quick review of each. I was specifically looking for hosting providers that provide dedicated Drupal hosting support and an administration dashboard of some kind. It turns out that a handful of such suppliers exist. Whilst it is perfectly possible to setup a server on AWS or DigitalOcean and then install Drupal there, this isn't what I am looking at. The good thing about Platform as a Service (PaaS) solutions is that you get hosting, backup, recovery, logging, tools, and analysis all built in. Some platforms even have extra tools like build pipelines, marketing systems or analytics.
philipnorton42 Thu, 07/02/2020 - 20:20