Does PHP also perform shallow copy-on-write for values passed as
parameters to functions?
";
function blah( $copy )
{
echo $copy;
}
blah( $text );
?>
Some of the guys I work with like to use: function( &$copy ) in order to
save the hypothetical storage space required to duplicate $
"Andi Gutmans" <[EMAIL PROTECTED]> wrote
> PHP 5 per-class constants can already except static arrays such as
> array(1, 2, 3) as their value. I'll put the issue of global constants on
> my TODO and believe PHP 5 will also support these for global constants.
> However, you won't be able to create
Mike-
If you're a LAMP user, then this vi mapping might help you out ;^)
:imap ~P $GLOBALS['HTTP_POST_VARS']['']hi
...and I believe I have addressed most of your points in my previous
posting on the subject. Forgive me if you've already read it, or if it
doesn't explain my position fully.
Just a correction on that. It started as two points, then grew into 4..
I should proof read more often ;)
Mike
Mike Eheler wrote:
> I disagree based simply on two points:
>
> a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated
> as "read only".
>
> b) There is no good reas
On Thu, 24 Jan 2002 15:45:34 -0800
Mike Eheler <[EMAIL PROTECTED]> wrote:
> I disagree based simply on two points:
>
> a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated
> as "read only".
I tell more : MUST be treated as readonly, as for every env/server or whatever
you want
I disagree based simply on two points:
a) Ideally, the $HTTP_POST/GET and $_POST/$_GET vars should be treated
as "read only".
b) There is no good reason to mix the two. Consistancy is the ideal. If
you are working on an existing project, and you have the implied need to
assign values to keys
PHP 5 per-class constants can already except static arrays such as
array(1, 2, 3) as their value. I'll put the issue of global constants on
my TODO and believe PHP 5 will also support these for global constants.
However, you won't be able to create a constant with a non-constant value
such as $_GE
Thanks for your responses (again), it is an unfortunate situation that
$HTTP_*_VARS must be retained for backwards compatibility until at least
the hypothetical PHPv5.0 mark. Having also read in this group that
define() does not support complicated constants, I'm guessing that it's
not currently