Have
you been waiting for the release of PHP 7 ? If so, your long wait for
it is becoming a reality, anytime soon. As a language for web
development, it has continued to be popular among the PHP developers community.
Undoubtedly,
this server side scripting language is today the language that is much
in demand. With a history of more than two decades, PHP has grown in
popularity right from its version 3.0. As time passed, numerous features
were added to this language, making the task of web development much
interesting.
Now
that PHP 7 is on the horizon, it is certainly worth to discuss what new
features can be expected, though this exercise is speculative in
nature.
PHP 7 Features and changes that are in the Making
PHPNG will become the basis for PHP 7
NG in PHPNG stands for 'next generation'. PHPNG, a new branch of PHP using Zend Engine, aims at improving the performance of PHP language and memory consumption efficiency. Also, code would run faster with JIT engine in PHP 7 dynamically compiling Zend opcodes into native machine code.
Combined Comparison Operators
It is also called by the name Spaceship Operator. It serves in performing 3-way comparisons from two operands. < = > operator will return 0 in case the values of both sides are same, will Return 1 in case the value on the left is greater, will Return -1 in case the value on the right is greater.
Scalar Type Declarations
Scalar Type Declarations will make way to use integers, strings, floats and booleans
as type declarations. It has to be noted that scalar type declarations
are non-restrictive. So, passing a float value to integer parameter will
simply coerce it to int with no warnings or errors getting generated.
Nevertheless, in case a wrong type is passed as an argument, errors can be thrown by enabling strict mode. For enabling strict mode, declare() directive has to be placed at the file top.
Return Type Declarations
With
the coming of PHP 7, the PHP developer can have the flexibility to
define the return type of functions and methods. The return type
declarations would also work in coercion mode and strict mode, same as in the case of Scalar Type Declarations.
Uniform Variable Syntax
Variable
operators in the yet to be released PHP 7 obtain wider orthogonality.
Unlike in the rest of PHP versions, it is possible to have a new
operator combinations. The flexibility of combining variable operators arbitrarily is allowed.
Added to the above mentioned, PHP 7 will offer consistent 64-bit
support, Anonymous class support, Isset Ternary Operator, Abstract
syntax tree, null coalesce operator, lots of libraries, generator return
expressions, generator delegation, and so on.
Conclusion
No
doubt, after the release of Version 7, PHP web development will get a
shot in the arm. For developers, the sheer pleasure of working on PHP
will only see an upward trend. As PHP 7 would be released anytime during the fourth quarter of 2015, you should till then continue with the preceding version of PHP, i.e., PHP 5.
0 comments:
Post a Comment