Re: [PHP4BETA] new array function names

From: Date: Sun, 06 Jun 1999 00:46:33 +0000
Subject: Re: [PHP4BETA] new array function names
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-1310@lists.php.net to get a copy of this message
At 00:14 06/06/99 , Monte Ohrt wrote:
Andrey has just submitted some new array functions to PHP. Question is, should these function names remain: push() pop() shift() unshift() slice() splice() or should we follow the convention: array_push() array_pop() array_shift() array_unshift() array_slice() array_splice() My thoughts: These will most likely be relatively widely used PHP functions, so I kind like them the way they are, easy to type and remember. And they match the perl function name counterparts, if that has any bearing. Other thoughts?
First, congrats on the new useful functions. About naming, I agree that these functions will probably be widely used. The only problem with naming them with these names is breaking downwards compatibility. Anyone that wrote a function named slice() would be bitten. I'd find something in between, some prefix that would make that clash less likely, but not as clumsy as array_*()... Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#1310) next »