In my previous post i have discussed new features of PHP 5.4 such as concept of Traits and shorter syntax of array.
In this post i’ll discuss the concept of function array dereferencing which is introduced in PHP 5.4. In simple words function array dereference means when array is returned, pick the value directly from it.
Most Used Array Functions in PHP
Function Array Dereferencing
Let’s understand through example.
In previous version of PHP, to dereference array temporary variable is used. We can’t directly array dereference the result of a function.
But in PHP 5.4 you can do this thing directly without storing the value in another variable.
Let’s take another example.