> -----Original Message-----
> [Phil Driscoll <[EMAIL PROTECTED]>]
 
> > My thought was that it may be possible to get rid of some of the
> > portability issues by implementing a new function php_portability()
> > which takes TRUE or FALSE arguments to turn it on or off.
> > 
> > The idea is that when switched on, it could modify the behaviour of
> > certain functions dependent on the php.ini settings -
> > e.g. addslashes or stripslashes would do nothing if magic_quotes
> > were on in php.ini and do its normal job if they were off.
> > 
> > Sadly the above example is complicated by having magic_quotes_gpc
> > and magic_quotes_runtime, so it may not be possible to sort out. The
> > other reason I didn't post yesterday, was that I could not then
> > think of any other functions for which this kind of behaviour would
> > work :)

I don't like the idea of a function like this, I think it's much more
important to educate people on how they write portable PHP code (to the
extent possible). If the PHP community is going to continue flaunting PHP as
a a portable language, the very same community must have guidelines on how
to make it portable.

Now, one of the reason that I post this is that even though I have been
programming PHP for two years, and feel fairly proficient at it, I know very
little about which settings are available and what they do (this has
generally been handled by the syops I've been working with.) I don't think
I'm alone at feeling a bit at loss when it comes to all the different
options and settings and stuff that might make your script break if you
upgrade, change server, or let someone else use them.

So, what I would like to see is a nice set of guidelines -- W3C style -- on
how to write portable PHP code. I think there are a lot of people out there
who could benefit from a such document.

André Næss

--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to