Jason Davidson mailto:[EMAIL PROTECTED]
on Wednesday, March 10, 2004 12:25 AM said:
would the following example be faster or slower had i simply done
$this-myArray[$i] = $i;
class MyClass {
var $myArray = array();
function MyClass() {
$myTempArray = array();
i would do it this way
function MyClass()
{
$this-myArray = range(0, 99);
}
luis.
Chris W. Parker [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
Jason Davidson mailto:[EMAIL PROTECTED]
on Wednesday, March 10, 2004 12:25 AM said:
would the following example be faster
here's how i would do it (coding styles aside):
function MyClass()
{
$limit = 100;
$i = -1;
while(++$i $limit)
{
$this-myArray[] = $i;
}
}
Don't forget poor old range:
$this-myArray = range(0, 99);
Luis Mirabal mailto:[EMAIL PROTECTED]
on Wednesday, March 10, 2004 12:30 PM said:
i would do it this way
function MyClass()
{
$this-myArray = range(0, 99);
}
guys (luis), guys (mike), let's not try to one-up each other...
...
...
but i would take it a step further. :P
function
Im fully aware of diffrent ways of doing it, my question is, in the 2
ways i mentioned, which is more efficient. Ill take the question to
the internals list. Thanks for your responses.
Jason
Chris W. Parker [EMAIL PROTECTED] wrote:
Luis Mirabal mailto:[EMAIL PROTECTED]
on Wednesday,
5 matches
Mail list logo