Features of latest PHP Version- PHP 5.6.0

September 6, 2014

As technology is advancing by leaps and bounds, so we can see constant updates in the various programming languages such as PHP, the most popular programming language adopted by most of the application developers.
On 28th August 2014, a new version of PHP was released and was immediately made available with some updated features, incompatible changes and much improved version.

So, let’s have a brief idea of its main features:

  • Constant scalar expressions
  • Variadic functions
  • Exponentiation using ** operator
  • Function & constant importing with use keyword
  • An interactive integrated debugger PHPdbg
  • A new re usable function PHP://
  • GMP objects provide operator overloading
  • Files more than 2 GB in size can now be uploaded

Now let’s look deeper into some of these features and how exactly they work:

  1. Constant Scalar Expressions: Now, we can provide scalar expressions with numeric and string literals or constants in contexts where a static value was displayed such as constant, property declarations and default function arguments.
    For e.g.:
    Constant Scalar Expressions
    Output will be:
    4
    The value of THREE is 3
  2. Variadic Functions: The most important feature is the implementation of variadic functions which now can be used with the help of …. Operator instead of using  func_get_args().
    For e.g.:
    Variadic Functions
    Output will be:
    $req: 1; $opt: 0; number of params: 0
    $req: 1; $opt: 2; number of params: 0
    $req: 1; $opt: 2; number of params: 1
    $req: 1; $opt: 2; number of params: 2
    $req: 1; $opt: 2; number of params: 3
  3. Exponentiation using ** operator: One of the easiest ways to use exponents is using **operator which is used to support exponentiation along with shorthand assignment operator “a”.
    Let’s understand this with an example:
    Exponentiation using ** operator
    Output will be as follows:
    2 ** 3 == 8
    2 ** 3 ** 2 == 512
    a == 8
  4. PHPdbg: Now this latest PHP version includes interactive debugger called PHPdbg which will be implemented as a SAPI module.
  5. Uploading large files becomes easy: A good news for those who had trouble especially regarding file upload in previous PHP versions, now with this PHP 5.6.0 . files upto 2 gb ( gigabytes) can be uploaded very easily.

Wrap Up:

Enjoy the journey of PHP and keep using latest versions to get better functionalities and it is well said that experts are always ahead from the usual crowd. So, make yourself an expert by trying different versions of this unique most popular programming language.

In case you feel that something is difficult to understand, then web developer for PHP framework at Softqube Technologies are here to help you.

Share on

Hari Patel

I am the Managing Director of Softqube Technologies Pvt. Ltd., a modern-day digital transformation, design and development service provider. We provide services to businesses of all verticals across the globe. I believe and live by a mission that I help more entrepreneurs to build, launch and grow profitable businesses.

Let’s Work together!

"*" indicates required fields

Drop files here or
Max. file size: 5 MB, Max. files: 2.
    This field is for validation purposes and should be left unchanged.