A simple little trick in PHP for when you need to make sure that a value doesn’t drop below zero. For example, you might be subtracting a discount from a basket total and not want the amount to be paid to become negative.
This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).
Earlier today I got caught out by an interesting little issue when using
env() to access environment configurable values on a deployed Laravel app. Despite having read through the documentation I managed to completely miss the caveat on using this function whilst caching the app’s configuration.
Constants are named values that do not change. You’ve probably used them many times to set a value that you want to persist throughout your codebase. In this short post I’m going to look at a couple of ways we can use them to improve our code. We’ll look at how they can be used to reduce bugs and make our code more readable.
A look at automating NPM and Composer when checking out new branches and pulling from a remote Git repository using Git hooks.
A tutorial on getting started with PayPal’s REST API using PHP and MySQL I wrote recently for Evoluted’s Think Tank.
Package managers like Composer for PHP and NPM for Node have become essential tools for simplifying a developer’s life. A package manager is a tool for keeping track of what you’ve installed, as well as installing and upgrading packages. They also check for dependencies and compatibility. Bower is a package manager for the web.
A beginners guide to the task runner Gulp. Taking a look at why you should use it and why it is possibly better than Grunt.
- Google have announced that they are shutting down Google+ four months early after a second data leak… twitter.com/i/web/status/1… 11 December 2018
- PHP 7.3 was released yesterday, this blog post by @brendt_gd provides a good overview of what's new… twitter.com/i/web/status/1… 7 December 2018
- It's official, Edge is moving over to Chromium. While there will be web developers celebrating the decision now I f… twitter.com/i/web/status/1… 7 December 2018
- I have written to my local MP @LouHaigh calling for a second referendum on Brexit. We need to act now to prevent th… twitter.com/i/web/status/1… 4 December 2018
- RT @codinghorror: This is actually.. bad news for browser ecosystem health. Quadrupling down on Chrome as the default HTML engine everywher… 4 December 2018