IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Actually, they can be modified.
I've got code that sets a value in $_REQUEST as part of the page initialization: it actually checks to see if an entry is set and if not, provides a default. This is because there is scads of code that just uses the entry in $_REQUEST without checking to see if it is even there...

(I filed a bug that PHP's default error level should include Notices turned on. They closed it as not a bug, citing the docs that say you should change it for development, but ignoring the fact that many developers never touch the php.ini file.)

I think what your programmer is doing is avoiding continually referencing $_REQUEST, perhaps under some impression that a direct variable lookup is faster than an array lookup. Or should I say, that it is faster enough to make a difference.

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New Did not know that
It's been a while since I read the docs, so it's likely my recollection that "you can't change them" was based more on how you should do things than the mandates of the language. Changing a $_REQUEST value makes about as much sense as changing a $_SERVER variable. Even if you can, I really don't think you should.
--

Drew
New I was rather glad it was possible.
But I don't like it, either. When I have opportunity (which doesn't happen as often as I would like), I refactor code that relies on that trick to not rely on that trick. Many other improvements often happen at the same time...

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
     Why would you rename variables? - (drook) - (13)
         I'd suspect reuse of another routine. - (Another Scott) - (2)
             Oh, it's definitely *not* to avoid globals - (drook) - (1)
                 Sounds like one of my old QuickBasic programs. =( -NT - (Another Scott)
         Re: Why would you rename variables? - (boxley) - (7)
             Not quite - (drook) - (6)
                 anything special about $_request? - (boxley) - (5)
                     Special variable in PHP - (drook) - (4)
                         Actually, they can be modified. - (static) - (2)
                             Did not know that - (drook) - (1)
                                 I was rather glad it was possible. - (static)
                         If speed counts ... - (crazy)
         There is, but it doesn't look like that's what is being done - (malraux) - (1)
             Like I told Wade, I didn't think that was an issue here - (drook)

Well, from then on, we had a whale of a time. I took her to dinner, I took her to dance. I bought her a bouquet of flounders. And then I went home with her. And what did I get for my trouble? A case of the clams.
40 ms