04-07-2015, 04:28 AM
This is hard point of discussion.
Each PHP major version 5.4, 5.5, 5.6 has its own nice things.
Here is short description of latest 3 major versions changelog:
5.4
5.5:
5.6:
Each PHP major version 5.4, 5.5, 5.6 has its own nice things.
Here is short description of latest 3 major versions changelog:
5.4
Quote:The key features of PHP 5.4.0 include:Changes that affect compatibility:
- New language syntax including Traits, shortened array syntax and more
- Improved performance and reduced memory consumption
- Support for multibyte languages now available in all builds of PHP at the flip of a runtime switch
- Built-in webserver in CLI mode to simplify development workflows and testing
- Cleaner code base thanks to the removal of multiple deprecated language features
- Many more improvements and fixes
- Register globals, magic quotes and safe mode were removed
- The break/continue $var syntax was removed
- The ini option allow_call_time_pass_reference was removed
- The PHP default_charset is now "UTF-8" within the distributed php.ini files, but still defaults to ""
5.5:
Quote:The key features of PHP 5.5.0 include:
Changes that affect compatibility:
- Added generators and coroutines.
- Added the finally keyword.
- Added a simplified password hashing API.
- Added support for constant array/string dereferencing.
- Added scalar class name resolution via ::class.
- Added support for using empty() on the result of function calls and other expressions.
- Added support for non-scalar Iterator keys in foreach.
- Added support for list() constructs in foreach statements.
- Added the Zend OPcache extension for opcode caching.
- The GD library has been upgraded to version 2.1 adding new functions and improving existing functionality.
- A lot more improvements and fixes.
- PHP logo GUIDs have been removed.
- Windows XP and 2003 support dropped.
- Case insensitivity is no longer locale specific. All case insensitive matching for function, class and constant names is now performed in a locale independent manner according to ASCII rules.
5.6:
Quote:The main features of PHP 5.6.0 include:
- Constant scalar expressions.
- Variadic functions and argument unpacking using the ... operator.
- Exponentiation using the ** operator.
- Function and constant importing with the use keyword.
- phpdbg as an interactive integrated debugger SAPI.
- php://input is now reusable, and $HTTP_RAW_POST_DATA is deprecated.
- GMP objects now support operator overloading.
- File uploads larger than 2 gigabytes in size are now accepted.
PHP 5.6.0 also introduces changes that affect compatibility:
- Array keys won't be overwritten when defining an array as a property of a class via an array literal.
- json_decode() is more strict in JSON syntax parsing.
- Stream wrappers now verify peer certificates and host names by default when using SSL/TLS.
- GMP resources are now objects.
- Mcrypt functions now require valid keys and IVs.