Page 2
6 Sep
Admin

Features of latest PHP Version- PHP 5.6.0

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.  

  3. 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

  4.  

  5. 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

  6.  

  7. PHPdbg: Now this latest PHP version includes interactive debugger called PHPdbg which will be implemented as a SAPI module.
  8.  

  9. 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.

contact
Are you looking for real talent for your dream projects?
Inquiry
We will respond you in within 24 hours
Do you have a project in mind?
Let's start your project
Quick Contact
We can give you a fast response via email, phone call or skype.
For business inquiries
Call us on
Let's Skype
Close
Inquire
Let’s make something awesome together!
Drop us a line, or give us a heads up if you’re interested in visiting us.
  • Accepted file types: docx, xlsx, ppt, pdf, jpg, gif, png.
  • 10 + 4 =
  • This field is for validation purposes and should be left unchanged.
100% secure and private