PHP Classes

How PHP 7.1 May Eliminate Frameworks BootStrap Overhead - Lately in PHP podcast episode 71

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog How PHP 7.1 May Elimi...   Post a comment Post a comment   See comments See comments (6)   Trackbacks (0)  

Author:

Viewers: 2,060

Last month viewers: 2

Categories: Lately in PHP Podcast, News

One of the greatest performance killers of applications that use large frameworks or libraries the overhead of bootstrap processes that is necessary to initialize the objects of their classes.

The good news is that a new feature called startup snapshot inspired on V8 engine (used by Chrome and Node.js) is being discussed to implement on PHP 7.1, so applications based on those frameworks take less time to startup and run.

The startup snapshot optimiziation was one of the main topics discussed by Manuel Lemos and Arturs Sosins in the episode 71 of the Lately in PHP podcast hangout.

They also talked about many proposals to make PHP 7 type hinting more complete, better text character set detection, PHP attributes similar to annotations, among many other new proposals.

The article also covers the latest enhancements to make PHP Classes package submission much smoother and more rewarding like the new monthly elePHPant prize and printed certificates that Innovation Award winners may get.

This article includes a transcript of the podcast summary.

Listen to the podcast, or watch the hangout video, or read the summary transcript to learn more about these interesting PHP topics.




Loaded Article

Contents

Introduction (0:20)

Summary (1:40)

PHP 5.5.35, 5.6.21, 7.0.6 released (8:40)

RFC: Short List Syntax (10:32)

RFC: Session ID without hashing (12:24)

RFC: Union Types (14:06)

RFC: Intersection Types (15:04)

RFC: Nullable Types (15:20)

RFC: Nullable Return Types (16:32)

Proposal: Final Properties (17:37)

RFC: Callable Types (19:02)

RFC: Functional Interfaces (20:07)

RFC: Lexical Scope Support for Anonymous Classes (22:52)

Proposal: Startup snapshot for optimizing app load time (24:20)

Proposal: Opcache get and set in PHP 7.1? (28:01)

RFC: Character Set dectector (29:28)

RFC: Forbid Null in $this (31:31)

RFC: PHP Attributes (annotations) (34:34)

RFC: Pipe Operator (37:44)

Article: How to Win a Big PHP ElePHPant Plush Mascott Every Month and Innovation Award Certificates? (39:59)

JavaScript Innovation Award Winners of February 2016 (55:22)

JavaScript Innovation Award Rankings of 2016 (1:00:11)

PHP Innovation Award Winners of February 2016 (1:01:45)

PHP Innovation Award Rankings of 2016 (1:08:46)

Conclusion (1:11:10)


Contents

Listen or download the podcast, RSS feed and subscribe in iTunes

Watch the podcast video, subscribe to the podcast YouTube channel

Transcript of the summary


Click on the Play button to listen now.


Download Size: 62MB Listeners: 1244

Introduction music Harbour used with explicit permission from the author Danilo Ercole, from Curitiba, Brazil

View Podcast in iTunes

In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.

Watch the podcast video

Note that the timestamps below in the transcript may not match the same positions in the video because they were based on the audio timestamps and the audio was compacted to truncate silence periods.

See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.

Show notes

Summary Transcript

We are going to start about commenting just the latest versions that were published recently of PHP.

Then we start commenting of several RFC, many of them are related.

First we start talking about the square bracket syntax for, they call it array destructuring assignment but it is for the list operator.

Then we have a proposal to avoid session ids to be generated without hashing to not expose the random number generator details, which is is a security concern.

Then we start talking about several RFC that are very related. One is about union types which are basically types that could be accepted as alternatives for function parameters, so for instance function parameters could have multiple possible to be accepted, not just one like it is no with type hinting.

Then intersection types is very similar but it is to require that certain parameters have like I would say, implements several interfaces, so to be maybe a class of objects that implements multiple interfaces not just one.

Then we have a discussion here about nullable types. Type hinting defines that you should have a parameter type, null could also be accepted, which is a very frequent requirement that had been seen requested by people.

There is another proposal nullable return type which is for return values to be allowed to be null, even there is type hinting.

Then there is a discussion about final properties. Classes already have final functions but do not have final variables. So the idea is to also have final variables. This was not implemented since the beginning but OK.

Then there is the RFC for callable types which are basically allowing to define that type hinting for a parameter should be callable.

Then we have function interfaces. Basically interfaces for function not classes. Just global functions.

Then there is something more I would say harder to explain but it is basically about passing certain values to be assigned to object, private properties on the constructor. They call it lexical scope for anonymous classes. So even if you don't have a class you could assign private properties on the object creation.

Then there is a proposal here to perform certain optimization when the PHP Zend engine starts by sort of generating a snapshot cache of the initial state of the Zend Engine when it loads, so next time when it runs it could save a bit of starting the Zend Engine.

Then there is a proposal to add opcache get and set functions like there is for APC, so a replacement for opcache but it did not not implement get and set properties that would be cached in shared memory, so there is this proposal.

Then we have a proposal to implement character set detector for text that guesses the character set that is being in use for text.

Then, man this is long, there is a proposal to forbid $this to be assigned to null in instance methods I think that's the interpretation of this.

Then there is a proposal to what they call attributes but in practice this could be called annotations, or it's new proposal.

Then there is the pipe operator which is to chain multiple function calls but do not have to return $this because these can be on non-objects, that's what I understood from this.

And then finally we have just to comment an article of many new interesting features for authors like the new elePHPant prize that is also being given as possible prize for the innovation award, and we have going to show you a sample a new elePHPant that is basically the same but now has a stripe personalized with the author name.




You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

3. Make Efficiency a Priority - Sandro Bilbeisi (2017-01-10 03:14)
PHP Frameworks must be compelled to pursue efficiency as a prior... - 1 reply
Read the whole comment and replies

2. Is the PHP community crazy? - Stefan Jibrail Froelich (2016-05-18 18:53)
Nullables are the devil's spawn.... - 1 reply
Read the whole comment and replies

1. Chrome and node.js - Gus Constan (2016-05-18 18:53)
Security... - 1 reply
Read the whole comment and replies



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog How PHP 7.1 May Elimi...   Post a comment Post a comment   See comments See comments (6)   Trackbacks (0)