Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
php:versions [2017-02-13] dcaiphp:versions [2020-04-19] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +===== PHP Versions =====
  
 +
 +==== 5.4 ====
 +[[http://docs.php.net/manual/en/migration54.new-features.php|ref]]
 +
 +  * Support for [[http://docs.php.net/manual/en/language.oop5.traits.php|traits]] has been added.
 +  * Short array syntax has been added, e.g. $a = [1, 2, 3, 4]; or $a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];.
 +  * Function array dereferencing has been added, e.g. foo()[0].
 +  * [[http://docs.php.net/manual/en/functions.anonymous.php|Closures]] now support $this.
 +  * Class member access on instantiation has been added, e.g. (new Foo)->bar().
 +  * Class::{expr}() syntax is now supported.
 +  * Binary number format has been added, e.g. 0b001001101.
 +  * Improved parse error messages and improved incompatible arguments warnings.
 +  * The session extension can now track the upload progress of files.
 +  * Built-in development web server in CLI mode
 +==== 5.5 ====
 +[[http://docs.php.net/manual/en/migration55.new-features.php|ref]]
 +
 +  * [[http://docs.php.net/manual/en/language.generators.php|Generators]] added
 +  * finally keyword added
 +  * foreach now supports list()
 +  * empty() supports arbitrary expressions
 +  * Class name resolution via ::class 
 +
 +
 +==== 5.6 ====
 +[[http://docs.php.net/manual/en/migration56.new-features.php|ref]]
 +
 +  * Constant expressions
 +  * Variadic functions via ...
 +  * Argument unpacking via ...
 +  * Exponentiation via ** 
 +  * use function and use const
 +
 +==== 7.0 ====
 +[[http://docs.php.net/manual/en/migration70.new-features.php|ref]]
 +
 +  * Scalar type declarations
 +  * Return type declarations 
 +  * Null coalescing operator
 +  * Spaceship operator 
 +  * Constant arrays using define()
 +  * Anonymous classes
 +  * Closure::call() 
 +  * Expectations
 +  * Group use declarations 
 +
 +==== 7.1 ====
 +http://docs.php.net/manual/en/migration71.new-features.php