News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Stijn Leenknegt's Blog:
[PHP6] function-return-array idea!
September 07, 2007 @ 15:19:00

Stijn Leenknegt has posted a suggestion of his directed towards the developers behind PHP6 for a different way to return array values that he'd of found handy in working with his latest application (a Zend Framework app).

In his example, he currently returns the result of a get() call on a registry value to a variable and gets the first value (of an array) from it. His suggestion, though is to simplify it down to something like:

$one = Zend_Registery::get('myArray')[0];

Making it even easier (and more elegant) to work with returned array values.

So dev team of PHP, could you discuss this idea and maybe you can add this to PHP6.
0 comments voice your opinion now!
function return array zendframework value elegant function return array zendframework value elegant


blog comments powered by Disqus

Similar Posts

Derick Rethans' Blog: Overloaded properties (__get)

Rob Allen's Blog: Zend_View: Access the view from a view helper

ProDevTips: Writing a CMS/Community with Smarty and the Zend Framework: Part 7

Nexen.net: PHP month of functions

Maarten Balliauw's Blog: Generic arrays in PHP


Community Events











Don't see your event here?
Let us know!


symfony2 release package database component framework security install hack hhvm language unittest series facebook introduction performance application opinion podcast composer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework