1 00:00:00,000 --> 00:00:04,925 [MUSIC] 2 00:00:04,925 --> 00:00:07,330 Hello, welcome to PHP 7. 3 00:00:07,330 --> 00:00:12,160 I'm Alena, and I'm very happy to introduce you to the first major release in PHP 4 00:00:12,160 --> 00:00:13,670 in over a decade. 5 00:00:13,670 --> 00:00:17,590 The PHP community is very excited to welcome this latest release. 6 00:00:17,590 --> 00:00:20,470 But that doesn't mean that PHP has been stagnant all this time. 7 00:00:20,470 --> 00:00:25,150 On the contrary, minor releases of PHP 5 brought many 8 00:00:25,150 --> 00:00:30,070 exciting features to PHP, including the support of object oriented programming and 9 00:00:30,070 --> 00:00:31,800 the many features associated with that. 10 00:00:33,160 --> 00:00:36,150 So first off, why seven and not six? 11 00:00:36,150 --> 00:00:39,150 Let's just say that Unicode didn't go so well. 12 00:00:39,150 --> 00:00:42,490 As with many projects, requirements were not well defined and 13 00:00:42,490 --> 00:00:46,150 people couldn't agree on things, so the project ground to a halt. 14 00:00:46,150 --> 00:00:48,520 But besides Unicode for encoding special and 15 00:00:48,520 --> 00:00:51,940 international characters, almost all the features being discussed for 16 00:00:51,940 --> 00:00:57,150 PHP6 Were eventually implemented in PHP 5.3 and later. 17 00:00:57,150 --> 00:00:59,940 So we really didn't miss anything else. 18 00:00:59,940 --> 00:01:02,150 Through it all, many things were learned, and 19 00:01:02,150 --> 00:01:05,340 a new process for feature requests was put in place. 20 00:01:05,340 --> 00:01:09,380 When the feature set for a major release was accepted, it was decided to 21 00:01:09,380 --> 00:01:13,750 avoid confusion with a dead project and to skip to version 7 for the latest release. 22 00:01:14,850 --> 00:01:17,790 So, what makes PHP 7 so special? 23 00:01:17,790 --> 00:01:20,240 In a single word, speed. 24 00:01:20,240 --> 00:01:24,490 The developers worked very hard to refactor the PHP code base in order to 25 00:01:24,490 --> 00:01:29,150 reduce memory consumption and increase performance, and they certainly succeeded. 26 00:01:30,160 --> 00:01:35,950 Bench marks for PHP 7 consistently show speeds twice as fast as PHP 5.6. 27 00:01:35,950 --> 00:01:38,530 And many times even faster. 28 00:01:38,530 --> 00:01:41,840 Although these results are not guaranteed for your project, 29 00:01:41,840 --> 00:01:46,600 the benchmarks were tested against major projects such as Drupal and WordPress. 30 00:01:46,600 --> 00:01:49,540 So these numbers don't come from abstract performance tests. 31 00:01:50,590 --> 00:01:54,910 With statistics showing that 25% of the web is being run on WordPress, 32 00:01:54,910 --> 00:01:57,250 this is a great thing for everyone. 33 00:01:57,250 --> 00:01:59,990 So what does this mean for you as a developer. 34 00:01:59,990 --> 00:02:03,920 Besides making your sites run faster, there are a number of new features in 35 00:02:03,920 --> 00:02:07,830 PHP 7 and I'll be covering these top features here. 36 00:02:07,830 --> 00:02:12,640 Type declarations, exceptions and error handling, spaceship and 37 00:02:12,640 --> 00:02:17,470 null coalesce operators, easy user land CSPRNG. 38 00:02:17,470 --> 00:02:20,750 We'll cover some of the gotchas associated with these features, and 39 00:02:20,750 --> 00:02:23,760 we'll also introduce you to a few more changes to watch out for. 40 00:02:23,760 --> 00:02:28,820 To help you get started right away, I've included links to many different resources 41 00:02:28,820 --> 00:02:32,780 as well as downloads of any of the code snippets used in these videos. 42 00:02:32,780 --> 00:02:37,519 So hold on to your hat and buckle up for this exciting time in PHP.