Introduction2:37 with Alena Holligan
I'm very happy to introduce you to the first major release of PHP in over a decade. So what does this mean for you as a developer? Besides making your sites run faster, there are a number of new features in PHP7 and I'll be covering the top features here. We'll cover some of the gotchas associated with these features and we’ll also introduce you to a few more changes to watch out for.
Download the latest version of PHP7
MAMP, XAMPP, and WAMP all include PHP7. Take a look at these workshops for installing a local development environment.
MAC: Local Development Environment
Windows: Local Development Environment
[MUSIC] 0:00 Hello, welcome to PHP 7. 0:04 I'm Alena, and I'm very happy to introduce you to the first major release in PHP 0:07 in over a decade. 0:12 The PHP community is very excited to welcome this latest release. 0:13 But that doesn't mean that PHP has been stagnant all this time. 0:17 On the contrary, minor releases of PHP 5 brought many 0:20 exciting features to PHP, including the support of object oriented programming and 0:25 the many features associated with that. 0:30 So first off, why seven and not six? 0:33 Let's just say that Unicode didn't go so well. 0:36 As with many projects, requirements were not well defined and 0:39 people couldn't agree on things, so the project ground to a halt. 0:42 But besides Unicode for encoding special and 0:46 international characters, almost all the features being discussed for 0:48 PHP6 Were eventually implemented in PHP 5.3 and later. 0:51 So we really didn't miss anything else. 0:57 Through it all, many things were learned, and 0:59 a new process for feature requests was put in place. 1:02 When the feature set for a major release was accepted, it was decided to 1:05 avoid confusion with a dead project and to skip to version 7 for the latest release. 1:09 So, what makes PHP 7 so special? 1:14 In a single word, speed. 1:17 The developers worked very hard to refactor the PHP code base in order to 1:20 reduce memory consumption and increase performance, and they certainly succeeded. 1:24 Bench marks for PHP 7 consistently show speeds twice as fast as PHP 5.6. 1:30 And many times even faster. 1:35 Although these results are not guaranteed for your project, 1:38 the benchmarks were tested against major projects such as Drupal and WordPress. 1:41 So these numbers don't come from abstract performance tests. 1:46 With statistics showing that 25% of the web is being run on WordPress, 1:50 this is a great thing for everyone. 1:54 So what does this mean for you as a developer. 1:57 Besides making your sites run faster, there are a number of new features in 1:59 PHP 7 and I'll be covering these top features here. 2:03 Type declarations, exceptions and error handling, spaceship and 2:07 null coalesce operators, easy user land CSPRNG. 2:12 We'll cover some of the gotchas associated with these features, and 2:17 we'll also introduce you to a few more changes to watch out for. 2:20 To help you get started right away, I've included links to many different resources 2:23 as well as downloads of any of the code snippets used in these videos. 2:28 So hold on to your hat and buckle up for this exciting time in PHP. 2:32
You need to sign up for Treehouse in order to download course files.Sign up