Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Dyrynda:
Switching PHP versions with Laravel Valet
Jan 24, 2017 @ 09:57:40

On his site Michael Dyrynda shows you how to switch PHP versions in Laravel Valet away from the current default of PHP 7.1 (should the need arise).

At the time of writing, Laravel Valet ships with PHP 7.1 but if you're like me, you have some legacy projects around the place that haven't quite lifted their dependencies to PHP 7 just yet.

A lot of folks might have previously used a VirtualBox Virtual Machine, or more recently considered Docker but a lot of the time and especially when dealing with simpler situations, Valet may be all that you need.

Luckily, the combination of Valet and brew on macOS makes switching PHP versions really easy.

With the help of the Homebrew tool it's as easy as telling it to install the PHP version you require and create the link to this needed version. He's included two screencasts in the post to show the process and commands you'll need to accomplish it.

tagged: laravel valet language version switch homebrew link tutorial

Link: https://dyrynda.com.au/blog/switching-php-versions-with-laravel-valet

Laravel News:
How to Use Old Versions of Laravel Homestead
Jan 20, 2017 @ 09:39:32

On the Laravel News site they've posted a tutorial by Joe Ferguson showing you how to [use older versions of Homestead](https://laravel-news.com/using-older-versions-of-homestead, the box not the app, in your development environment if there's a need.

There are two parts to Homestead: the Vagrant box and the Homestead source code (Homestead app). The Homestead Vagrant box is a snapshot of a preconfigured virtual machine ready to use. [...] We use the Laravel Settler repo to build the Homestead boxes. You have to ensure the version of the Homestead Vagrant box is compatible with the version of the Homestead app you are using.

Why would you want to use a previous version? [...] While Homestead development moves forward pretty quickly, you may not be ready to move your clients from PHP 5.5. While you should have already moved your apps to PHP 7.0 for the performance gains, I understand that because Laravel 5.1 supports 5.5, developers may want to continue using that version.

He then walks you through an example, showing how to use PHP 5.5 with Homestead and what version to put for the best support. It requires a little bit of manual fiddling around but not too much. Then it's just a simple "vagrant up" to get it running. He also includes instructions on using PHP 7.0, checking out a different version of the Homestead repository and bringing up the box similar to above.

tagged: laravel homestead version older vm application framework support

Link: https://laravel-news.com/using-older-versions-of-homestead

SitePoint PHP Blog:
What’s New and Exciting in PHP 7.1?
Dec 09, 2016 @ 12:13:10

The SitePoint PHP blog has a new article posted sharing "what's new and exciting in PHP 7.1", the latest major version release in the PHP 7.x series. This version was released on December 1st of 2016.

The PHP community has gone viral with the latest PHP 7 announcement and all the goodies it brings to the language. The PHP 7.1 release has more good news and features to offer. This article highlights the most important ones, and you should check PHP RFC for the full list.

Included in their list of enhancements are features like:

  • the ArgumentCountError Exception
  • Nullable Types
  • the Iterable Type
  • Catching Multiple Exception Types
  • Invalid String Arithmetics

For each item on the list some brief code examples are provided, often showing the difference between the new behavior and previous PHP versions.

tagged: exciting new version php71 version release tutorial

Link: https://www.sitepoint.com/whats-new-and-exciting-in-php-7-1/

SitePoint PHP Blog:
What’s New and Exciting in PHP 7.1?
Dec 09, 2016 @ 12:13:10

The SitePoint PHP blog has a new article posted sharing "what's new and exciting in PHP 7.1", the latest major version release in the PHP 7.x series. This version was released on December 1st of 2016.

The PHP community has gone viral with the latest PHP 7 announcement and all the goodies it brings to the language. The PHP 7.1 release has more good news and features to offer. This article highlights the most important ones, and you should check PHP RFC for the full list.

Included in their list of enhancements are features like:

  • the ArgumentCountError Exception
  • Nullable Types
  • the Iterable Type
  • Catching Multiple Exception Types
  • Invalid String Arithmetics

For each item on the list some brief code examples are provided, often showing the difference between the new behavior and previous PHP versions.

tagged: exciting new version php71 version release tutorial

Link: https://www.sitepoint.com/whats-new-and-exciting-in-php-7-1/

Kinsta.com Blog:
What’s New in PHP 7.1.0
Nov 25, 2016 @ 13:32:29

On the Kinsta blog there's a post detailing some of the new features that are coming in the next release in the PHP 7 series - PHP 7.10.

The newest version of PHP – 7.1.0 – is already at RC6 (Release Candidate 6) status, which means it will be out soon. After a huge update that took PHP from 5.6 straight to 7.0 increasing speeds considerably, PHP is now focusing on core language features that will help all of us write better code. In this article I’ll take a look at the major additions and features of PHP 7.1.0 which is just around the bend.

Their list of items includes:

  • nullable types
  • iterable and void returns
  • the use of keys in lists
  • number operators and malformed numbers

Each item in the list includes a brief description and some example code show the feature in use where it makes sense. If you're not overly familiar with what's coming in PHP 7.1 this is a great guide.

tagged: kinsta php71 upcoming version feature php71rc6 release detail

Link: https://kinsta.com/blog/php-7-1-0/

Joe Ferguson:
Use Laravel Shift for your next upgrade
Nov 24, 2016 @ 09:13:23

In this new post to his site Joe Ferguson takes a look at Laravel Shift, an automated service that makes it easier to upgrade your Laravel-based application quickly.

I’ve had an eye on LaravelShift.com since it first made it’s way across my twitter feed some time ago. I’ve also had the pleasure of meeting and talking with it’s creator Jason McCreary at a few conferences over the past year. I think it’s really awesome when community members are able to take a product to market that not only scratches their own itch, but can provide value to the rest of the community as well.

[...] I built NerdsAreDrinking on Laravel 5.1 because that was the current version at the time. We have seen two more release since: 5.2 and 5.3. The upgrade process isn’t terrible however there is a lot you may need to take into account. Rather than upgrade from 5.1 to 5.2 and then 5.2 to 5.3 I decided to use Laravel Shift to do the 5.1 to 5.2 upgrade for me.

Joe then talks some about his experience using the service and was impressed at the speed of the service to create the required Pull Request for the update. He includes a link to the PR so you can see what the upgrade looks like too. He feels like the money spent (around $11 USD) was well invested and would definitely use the service again.

tagged: laravel laravelshift upgrade opinion service version

Link: https://www.joeferguson.me/use-laravel-shift-for-your-next-upgrade/

Jordi Boggiano:
PHP Versions Stats - 2016.2 Edition
Nov 18, 2016 @ 11:17:40

In his latest post Jordi Boggiano (of the Composer project) has released his PHP usage statistics for the second half of 2016 based on the information gathered during Composer installations.

It's stats o'clock! See 2014, 2015 and 2016.1 for previous similar posts.

A quick note on methodology, because all these stats are imperfect as they just sample some subset of the PHP user base. I look in the packagist.org logs of the last 28 days for Composer installs done by someone. Composer sends the PHP version it is running with in its User-Agent header, so I can use that to see which PHP versions people are using Composer with.

He compares them to the statistics from May 2016 showing some interesting but not unexpected changes, mostly in the growth of PHP 7+ versions. He shares a few of his own observations of the results and encourages library authors to start focusing on PHP 7 functionality rather than 5.5/5.6 compatibility. He also shares a secondary data set - the PHP versions that libraries require that, surprisingly, is moving a lot slower than the actual PHP version adoption.

tagged: version language statistics 2016 requirement composer install results

Link: https://seld.be/notes/php-versions-stats-2016-2-edition

TutsPlus.com:
Internationalizing WordPress Projects: Updates With WordPress 4.6
Oct 13, 2016 @ 12:07:47

TutsPlus.com has posted the latest in their "Internationalizing WordPress" series today, focusing on some of the changes that have come with the release of WordPress 4.6.

Throughout this series, we've covered exactly what you need to do to internationalize your WordPress projects. If you've not read any of the previous posts, I recommend checking them out.

Though there have been some changes to how internationalization and localization work in WordPress 4.6, that doesn't mean the previous tutorials are irrelevant. It just means that the way you opt to distribute your plugins and their localizations will change.

And that's what we're going to be covering in this tutorial.

You'll need to be caught up on the series before following along with this article. It defines some of the basics and gets your WordPress install in a certain state. Then they get into the changes with the WordPress update including a brief overview of how the internationalization and localization functionality now works and the idea of "just-in-time" translations.

tagged: wordpress update internnationalization localization version

Link: https://code.tutsplus.com/tutorials/internationalizing-wordpress-projects-updates-with-wordpress-46--cms-27155

Jason McCreary:
Update PHP on Mac OS X
Sep 20, 2016 @ 10:15:26

Jason McCreary has posted an update to his guide for installing PHP on Mac OS X and replacing the version of PHP that comes with El Capitan (5.5) with a handy package manager more specific to PHP installations.

As noted in my posts on Installing Apache, PHP and MySQL on Mac OS X, OS X comes pre-installed with Apache and PHP. Unfortunately, as of Mac OS X 10.11 (El Capitan) the pre-installed version of PHP is still 5.5. As PHP 5.5 has reached end of life, I imagine the pre-installed version of PHP will be updated with Mac OS 10.12 (Sierra). However, it may only be PHP 5.6.

So what do you do if you want to upgrade or install a different PHP version on your Mac? Well, you could use Homebrew. But I found a pre-packaged alternative - PHP OSX.

With this package manager, the installation is only a few steps but he lists them out with a bit more detail to help you understand what's happening:

  • Installing PHP (your choice of version)
  • Configuring Apache (loading the php5 shared module)
  • Updating your PATH
  • Configuring PHP
tagged: osx update language version package simple installation tutorial

Link: http://jason.pureconcepts.net/2016/09/upgrade-php-mac-os-x/

PHP.net:
PHP 7.1.0 Release Candidate 2 Released
Sep 19, 2016 @ 10:19:12

The main PHP.net site has announced the release of the latest Release Candidate for the upcoming PHP 7.1.0 version - PHP 7.1.0 RC2.

The PHP development team announces the immediate availability of PHP 7.1.0 Release Candidate 2. This release is the second release candidate for 7.1.0. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. [...] The third release candidate will be released on the 29th of September. You can also read the full list of planned releases on our wiki.

They include the usual reminder that this is a preview release and is not intended fro production use. If you'd like to test it out with your application, you can download the source release here or go to the windows.php.net QA site to get the Windows binaries.

tagged: language version php71 release releasecandidate rc2

Link: http://php.net/index.php#id2016-09-16-2