Monthly Archives: April 2021
-
April 02, 2021
Recently, I updated the PHP on my machine to version 7.4 using homebrew for Mac OS only to then realise that one of my older projects that I still needed to maintain, made on version 7.2 would no longer work due to using depreciated PHP functions such as array_key_exists.
The long term solution to this would be to update the project so it’s compatible with PHP version 7.4, but for the sake of time, and potential fixes that needed to go out immediately, I needed to be able to develop this project in the environment it’s running in. Fortunately, I use valet to develop all my PHP applications a tool I can only recommend for PHP developers. Valet allows you to develop PHP applications on your local machine with a much higher level of ease than I’ve found using other services such as dockers or XAMP/MAMP.
Valet, with the use of homebrew, supports switching your system PHP version at will to any version installable via homebrew. So switching versions can be as simple as the following: