Summary: PHP announces its new 7.3 version update this Christmas with several new and updated user-friendly features that are accepted in the version update by users voting.
The new release of PHP 7.3 version with cool new features
PHP announces its new 7.3 version update this Christmas with several new and updated user- friendly features that are accepted in the version update by users voting.
The latest and greatest features of this 7.3 version include deprecations, functionality and many bug fixes with a great boost in performance the key updates that are most important to users are mentioned in this post below. This is the third feature update in PHP 7 series.
In this post, the following key features are covered...
Implementation of flexible Heredoc and Nowdoc syntaxes
o is_countable function
o array_first_key(), array_last_key() o list() reference assignment
With the above feature changes in this 7.3 version, many bugs are settled to the ground and the overall performance is boosted and optimized.
Heredoc and Newdoc implementation
This is presumably a standout amongst the most applicable upgrades accompanying PHP 7.3, and we think it merits somewhat more consideration. Along these lines, before plunging into PHP 7.3 heredoc/nowdoc transforms, we'll give a snappy diagram of this helpful center element. In the event that you are as of now sure with nowdoc and heredoc, don't hesitate to bounce to the PHP 7.3 changes.
Here is what Heredoc and Newdoc features.
The using Heredoc syntax user can add a large amount of text without using the special escape
characters like double quotes. The heredoc syntax starts with <<< followed by a marker, and
ends with the same marker followed by a semicolon. For instance
The text to be printed......... EOT
Nowdoc is somehow similar to heredoc just the terminal identifier encloses in quotes ‘’
And there is no scope for parsing.
While using JSON the error catching and detecting was quite a headache for developers this major problem was fixed in this release of updates.
In the previous version we need to workaround to detect an error in JSON block and that was too tedious that had been fixed in this update as using try-catch block of code using JSON-THROW- ON-ERROR in it.
The previous PCRE extension has been updated to PCRE2 that will cause some minor significant changes in the structure of it. For instance, the character ranges in classes are now somehow more strictly interpreted.
In the previous versions, there pops an error when we try to count the attributes that are not countable this is now fixed in this release as a function is_countable is added which returns True or False depending upon whether the attribute s countable or not.
array_first_key() , array_last_key()
These functions intentionally included in this release as to return first and the last index of the array respectively other methods can be implemented in older versions but that reduces readability and efficiency of the code.
list() reference assignment
The list() reference allows us to assign variable by reference as the same data keeping in one variable is assigned to another. The advantage of this proposal is that we could now assign multiple variables by reference.
Thus the overall release of PHP 7.3 comes very handy with developers they can now take advantages of features that are included in it with an efficient and boosted way to code.