13
results
Andrew Fletcher
•
13 Feb 2023
Installing PHP on OSX and it installed PHP 8.2.x. However, for my applications I need to run 8.1.x. How do you switch the current PHP version?
Current version
Check the current PHP version by executing the command
php -v
Response:
PHP 8.2.2 (cli) (built: Feb 5 2023 12:38:16) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.2, Copyright (c) Zend Technologies
with Zend OPcache v8.2.2, Copyright (c), by Zend Technologies
Unlink PHP
To change your PHP version, begin by...
Andrew Fletcher
•
12 Feb 2023
Update Ubuntu 20.04
To begin update the server using the command
sudo apt...
Andrew Fletcher
•
01 Jul 2022
JSON structure
Outlining the structure of the elements common attributes:...
Andrew Fletcher
•
20 Jun 2022
In this instance, I'll check the beginning of the string. I want to focus on...
Andrew Fletcher
•
29 May 2022
Working from the bases that .DS_Store has not been added to your git repository,...
Andrew Fletcher
•
18 May 2022
To sort through a multidimensional array seems to be a function that I occasionally call on. Handy to have referenced here:
/**
* Loop through a multi dimensional array
*
* @param array $haystack
* Data array.
*/
protected function sortMultiDimensionalArray($haystack)
{
foreach ($haystack as $key => $item) {
// If $item is an array and the number of children is greater to one
// keep looping through the array.
if (is_array($item) &&...
Andrew Fletcher
•
11 May 2022
phpcs issue in Visual Studio Code, I'm receiving this warning in VS...
Andrew Fletcher
•
09 May 2022
Had the situation where you are running composer however, the scripts stops with...
Andrew Fletcher
•
27 Apr 2022
Oh the treasure of a client coming to you with a site they have removed the...
Andrew Fletcher
•
17 Mar 2022
I installed Lando 3.6.2 and Laravel 9. When I visit the web page, I...
Andrew Fletcher
•
15 Feb 2022
Updating to PHP 8.1, I found this interesting code stop...
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in bales_preprocess() (line 162 of /var/www/{path/to/file})
What is trim(). Very simply, it removes whitespaces (if they exist) at the start or end of a string.
Andrew Fletcher
•
15 Feb 2022
Running Docker
Dangerous word... I'm assuming that Docker is installed. Don't...
Andrew Fletcher
•
29 Mar 2021
A bug bear that I have had for a while with Drupal content is how come the...