Re: [PHP] Allowing . in $_POST variable

2003-01-28 Thread Philip Olson

Regarding keeping . as . and not _ in variables:

This isn't going to happen as it seriously breaks
BC.  This also would affect functions such as 
import_request_variables() and extract().  There
is no worthy benefit here, this will never happen.

Regards,
Philip









-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Allowing . in $_POST variable

2003-01-28 Thread 1LT John W. Holmes
> > > >   Basically, what I'd like is to be able to post a form element with
> > > > id="myvariable.whatever" and access it on the next page with
> > > > $_POST["myvariable.whatever"].
> > >
> > > // obviously this is some busted garbage
> > > $name.Array["first"]="Chris";
> > > $name.Array["last"]="Wesley";
> > > $name=$name.Array["first"]." ".$name.Array["last"];
> >
> > That assumes register_globals is ON, though, which isn't recommended. If
you
> > read the questions, the poster talks about using the value such as
>
> There aren't two different lexigraphical parsers if you turn
> register_globals on or off.  So, PHP either allows ALL variables to have a
> "." in their name, or disallow it altogether.  So, moving outside of the
> narrow case of POST variable names is what I did *after thoroughly reading
> and thinking about the question*.  (Somebody missed the Lex & Yacc hint.)

I'm not familar with the core code of PHP at all, but what would happend if
this "feature" was just disabled? For everyone with rg OFF, it wouldn't
affect them, right? If rg is ON and you never use a period in a variable
name, then it shouldn't affect you either, right? What is someone actually
did, though? Would it cause PHP to shit itself or just make a weird variable
name? My point was that who cares what it does, because it's only going to
affect people with rg ON, anyhow, that try using a period, right?

> > $_POST['name.Array'], which is valid. Since it's encouraged to have
register
> > globals OFF, I think they should do aways with this period to underscore
> > thing, also. It will only jack up people's code that rely on
> > register_globals and they should be changing it anyhow.
>
> As long as it's possible to turn register_globals on, this will have to be
> a problem.  I'd vote for tearing this bandaid off, getting rid of
> register_globals altogether, and undo all the idiosyncrasies it causes,
> but that's just me (and others who think similarly).

Yeah, I agree, but we both know that won't happen for a while.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Allowing . in $_POST variable

2003-01-28 Thread Chris Wesley
On Tue, 28 Jan 2003, 1LT John W. Holmes wrote:

> > >   Basically, what I'd like is to be able to post a form element with
> > > id="myvariable.whatever" and access it on the next page with
> > > $_POST["myvariable.whatever"].
> >
> > // obviously this is some busted garbage
> > $name.Array["first"]="Chris";
> > $name.Array["last"]="Wesley";
> > $name=$name.Array["first"]." ".$name.Array["last"];
>
> That assumes register_globals is ON, though, which isn't recommended. If you
> read the questions, the poster talks about using the value such as

There aren't two different lexigraphical parsers if you turn
register_globals on or off.  So, PHP either allows ALL variables to have a
"." in their name, or disallow it altogether.  So, moving outside of the
narrow case of POST variable names is what I did *after thoroughly reading
and thinking about the question*.  (Somebody missed the Lex & Yacc hint.)

> $_POST['name.Array'], which is valid. Since it's encouraged to have register
> globals OFF, I think they should do aways with this period to underscore
> thing, also. It will only jack up people's code that rely on
> register_globals and they should be changing it anyhow.

As long as it's possible to turn register_globals on, this will have to be
a problem.  I'd vote for tearing this bandaid off, getting rid of
register_globals altogether, and undo all the idiosyncrasies it causes,
but that's just me (and others who think similarly).

~Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Allowing . in $_POST variable

2003-01-28 Thread 1LT John W. Holmes
> > sense to me that this "feature" get another look.  I can see no logical
> > reason to not allow . in the global $_POST variable...
> >   Basically, what I'd like is to be able to post a form element with
> > id="myvariable.whatever" and access it on the next page with
> > $_POST["myvariable.whatever"].
>
> Here's just one of many good reasons ...
>
> // obviously this is some busted garbage
> $name.Array["first"]="Chris";
> $name.Array["last"]="Wesley";
> $name=$name.Array["first"]." ".$name.Array["last"];

That assumes register_globals is ON, though, which isn't recommended. If you
read the questions, the poster talks about using the value such as
$_POST['name.Array'], which is valid. Since it's encouraged to have register
globals OFF, I think they should do aways with this period to underscore
thing, also. It will only jack up people's code that rely on
register_globals and they should be changing it anyhow.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Allowing . in $_POST variable

2003-01-28 Thread Chris Wesley
On Tue, 28 Jan 2003, Mike Potter wrote:

> sense to me that this "feature" get another look.  I can see no logical
> reason to not allow . in the global $_POST variable...
>   Basically, what I'd like is to be able to post a form element with
> id="myvariable.whatever" and access it on the next page with
> $_POST["myvariable.whatever"].

Here's just one of many good reasons ...

// obviously this is some busted garbage
$name.Array["first"]="Chris";
$name.Array["last"]="Wesley";
$name=$name.Array["first"]." ".$name.Array["last"];

// and this is not
$name_Array["first"]="Chris";
$name_Array["last"]="Wesley";
$name=$name_Array["first"]." ".$name_Array["last"];

You'd make both your Lex and your Yacc puke while parsing the first one ;)

~Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Allowing . in $_POST variable

2003-01-28 Thread Adam Voigt




Well I think using periods in variable names in general is a no-no, but other

then being a little out-of-the-norm I see no reason why you shouldn't

be allowed to.



P.S. OEOne is swet software, good job.



On Tue, 2003-01-28 at 13:50, Mike Potter wrote:

Hi all:

  I filled a bug today that quickly got resolved invalid, but I think it 

deserves another look.

  I had a bit of a problem today with "." getting converted to "_" for 

my variable names automatically.

  I have been told that this was because if you have register_globals 

on, then you can't have a variable with a . in its name.  Fair enough.

  However, since that's now considered to be bad practice, it would make 

sense to me that this "feature" get another look.  I can see no logical 

reason to not allow . in the global $_POST variable...

  Basically, what I'd like is to be able to post a form element with 

id="myvariable.whatever" and access it on the next page with 

$_POST["myvariable.whatever"].

  Comments are appreciated.

Mike





-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP] Allowing . in $_POST variable

2003-01-28 Thread Mike Potter
Hi all:
 I filled a bug today that quickly got resolved invalid, but I think it 
deserves another look.
 I had a bit of a problem today with "." getting converted to "_" for 
my variable names automatically.
 I have been told that this was because if you have register_globals 
on, then you can't have a variable with a . in its name.  Fair enough.
 However, since that's now considered to be bad practice, it would make 
sense to me that this "feature" get another look.  I can see no logical 
reason to not allow . in the global $_POST variable...
 Basically, what I'd like is to be able to post a form element with 
id="myvariable.whatever" and access it on the next page with 
$_POST["myvariable.whatever"].
 Comments are appreciated.
Mike


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php