PHP8
PHP8
While all progressive humanity is switching to PHP7, and the less progressive is still languishing over some 5.4, I decided to find out what is promised in the eighth version and when it is promised to be released.
The official wiki has a page where you can familiarize yourself with a rather meagre list of offers for the eighth version. I was most interested in two changes that seriously break backwards compatibility: first, it is proposed to prohibit creating properties, objects and constants with the particular same name inside the exact same class, and second, in order to prohibit creating functions, constants, classes, interfaces and characteristics with the same title in the same namespace.
The change is validated from the syntax unification – the entity being utilized is derived from the particular context, say, static qualities start with a buck, and methods are not really, but if the technique name is kept inside a variable, the syntax drops apart – there will be no way to show what the programmer designed.
Or perhaps a similar example along with a constant:
class Test
const test = 'const';
public static $ test = 'variable';
$ test sama dengan 'test';
// what are usually you?
var_dump (Sample:: dollar test);
// actually earnings "variable", obviously; The regular will have to obtain this:
var_dump (constant ("Sample:: $ test"));
In truth, it would be feasible to obtain out the mounting brackets (now it is feasible to call a private function written in the class property), I do not know issue option has been considered, but perhaps this is less intuitive.
// so it would become possible to get the regular by name within a variable (does not really work! )
var_dump (Sample:: ($ text));
The majority of considerable internal change within the era is probably to be the inclusion of JIT.
By the way, this is not the first attempt to combine dynamic compilation and PHP, in the HHVM language, PHP dialect from Facebook, such a compilation gives a good gain in speed.
When will be the release of PHP8? The particular date, alas, is unfamiliar, but there is a good assumption that the brand new major version can barely be expected before September 2021.