Array Dereferencing is really very good feature added in PHP 5.4. With this you can directly access an array object directly of a method a functions.
Now we can say that no more temporary variables in php now. This is becasue earlier we must have to take array in one variable then we can make further process on that array. Have a look at below example for what we were doing before PHP 5.4.
Now have a look at code block for how we can achieve this without temporary varibale:
Isn’t it really helpful??
No more temporary variables with arrays now!!!
Now have a look at be other benefetits of Array Dereferencing in PHP 5.4
As as above code you can deal with functions call also.
For full list of Features included in PHP 5.4, have a look at this article.
Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.
View all posts by: Avinash