On Tue, 2006-04-11 at 23:15, Martin Alterisio "El Hombre Gris" wrote:
> Well, it was a bad example to begin with, first of all max() is already
> defined in php, I should at least checked that before posting. Second, I
> forgot PHP (the Zend engine) has an interesting way of handling
> variables
Well, it was a bad example to begin with, first of all max() is already
defined in php, I should at least checked that before posting. Second, I
forgot PHP (the Zend engine) has an interesting way of handling
variables, when you copy assign a var or pass it as an argument of a
function, a real
tedd wrote:
The ampersand before the function name indicates that the function
returns a reference instead of a copy of the variable, for example:
$var2) return $var1;
else return $var2;
}
$global1 = 10;
$global2 = 9;
$maxglobal =& max($global1, $global2);
$maxglobal++;
echo $
The ampersand before the function name indicates that the function
returns a reference instead of a copy of the variable, for example:
$var2) return $var1;
else return $var2;
}
$global1 = 10;
$global2 = 9;
$maxglobal =& max($global1, $global2);
$maxglobal++;
echo $global1;
//
On Tue, April 11, 2006 10:42 am, tedd wrote:
>function &ref3($a)
> {
> $a--;
> }
>
> ?>
I believe this one will only "matter" if you are RETURNING a value.
And only really matter if that value is an object...
--
Like Music?
http://l-i-e.com/arti
The ampersand before the function name indicates that the function returns a
reference instead of a copy of the variable, for example:
$var2) return $var1;
else return $var2;
}
$global1 = 10;
$global2 = 9;
$maxglobal =& max($global1, $global2);
$maxglobal++;
echo $global1;
//th
At 7:31 PM -0700 4/10/06, Ray Hauge wrote:
>
I believe you're thinking more of the C++ style of returning by reference.
This article should help explain how references work, and how to return
references... most specifically check the "Returning References" section.
> http://www.php.net/ma
>
> I believe you're thinking more of the C++ style of returning by reference.
> This article should help explain how references work, and how to return
> references... most specifically check the "Returning References" section.
>
> http://www.php.net/manual/en/language.references.php
>
> HTH
> --
On Monday 10 April 2006 19:19, Richard Lynch wrote:
> On Sun, April 9, 2006 1:17 pm, tedd wrote:
> > Hi gang:
> >
> > Not that I have an immediate need for this, but in other languages
> > one can access a function by reference (in other words, it's address
> > -- such as call(function address) ).
On Sun, April 9, 2006 1:17 pm, tedd wrote:
> Hi gang:
>
> Not that I have an immediate need for this, but in other languages
> one can access a function by reference (in other words, it's address
> -- such as call(function address) ).
>
> In php, one can pass a variable by reference by simply usi
> Boy, am I in love with this language -- it gives you plenty of
shovels to dig yourself in as deep as you want.
*lol*. personally I prefer the other format which was what I tried to
illustrate with my original example:
Oh, you illustrated it very well. I looked intently at it and learned
On Mon, 2006-04-10 at 09:42, tedd wrote:
> >It's the same thing for the most part...
> >
> > >
> >$a = 'f_a';
> >call_user_func( $a, $p1, $p2, $p3 )
> >
> >?>
> >
> >Cheers,
> >Rob.
>
> Rob:
>
> No way dude -- that was too easy!
>
> Boy, am I in love with this language -- it gives you plenty of
It's the same thing for the most part...
Cheers,
Rob.
Rob:
No way dude -- that was too easy!
Boy, am I in love with this language -- it gives you plenty of
shovels to dig yourself in as deep as you want.
Thanks Rob.
tedd
--
---
On Sun, 2006-04-09 at 14:17, tedd wrote:
> Hi gang:
>
> Not that I have an immediate need for this, but in other languages
> one can access a function by reference (in other words, it's address
> -- such as call(function address) ).
>
> In php, one can pass a variable by reference by simply usi
Hi gang:
Not that I have an immediate need for this, but in other languages
one can access a function by reference (in other words, it's address
-- such as call(function address) ).
In php, one can pass a variable by reference by simply using the
ampersand, such a &$a.
Is there a similar w
Hi all. I was wondering, can a reference be a function as well? Reason is, I've got to
do a little manipulating. I want to do a
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
where I want \\1 to be fed into urlencode() I was thinking somewhere along th
At 11:35 31-1-01 +0300, Max A. Derkachev wrote:
>Hello Niklas,
>
>Wednesday, January 31, 2001, 7:02:49 PM, you wrote:
>NS>
>$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
Take a look @ Preg_Replace with the e modifier, i think you are looking for
that (p
Hello Niklas,
Wednesday, January 31, 2001, 7:02:49 PM, you wrote:
NS>
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
NS> where I want \\1 to be fed into urlencode() I was thinking somewhere along the
lines
NS> $func=&urlencode;
It won't work. You can
Hi all. I was wondering, can a reference be a function as well? Reason is, I've got to
do a little manipulating. I want to do a
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
where I want \\1 to be fed into urlencode() I was thinking somewhere along th
19 matches
Mail list logo