PHP 7

PHP 7 Crash Course

Lone Star PHP 2016

PHP 7 was recently released, bringing some much-desired changes and improvements to the language. However, many developers haven't had the opportunity to use it for their projects and may not be familiar with the changes it brings. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.

Installing PHP 7.0

Installing PHP 7.0 is easier than ever.  Here are instructions for installing the latest version on different platforms:

PHP 5.x Conflicts

You may encounter conflicts if you already have PHP 5.x installed. If so, make sure to completely remove PHP 5.x from your system before installing 7.0. On Ubuntu, this is as simple as running: sudo apt-get purge php5-*.

 

 

With the imminent release of PHP 7 on the horizon, I thought it would be cool to check out some of the lesser-known features coming with the 7.0.0 release:

1. Array constants in define()

PHP 5.6 added the ability to define array constants on classes by using the const keyword:

const LUCKY_NUMBERS = [4, 8, 15, 16, 23, 42];

PHP 7 brings this same functionality to the define() function:

 

PHP 7 Crash Course

php[world] 2015

The PHP 7 release is just around the corner, bringing some much-desired changes and improvements to the language. However, many developers simply aren't aware of what's coming. We'll remedy this by checking out the new "spaceship operator," demonstrating how static type hints produce clean code, and using anonymous classes to quickly implement interfaces on the fly. Attendees will also learn about breaking changes and "gotchas" to watch out for when making the upgrade and will receive pointers on getting started with PHP 7 today.

PHP 7 Upgrade Guide

The PHP 7 release is just around the corner, bringing some much-desired changes and improvements to the language. However, many developers simply aren't aware of what's coming. This book covers all of the new features coming in PHP 7, as well as breaking changes and "gotchas" to watch out for. You'll learn how to take advantage of these changes and get started with PHP today.