Re: Portability concerns

From: Date: Sat, 04 Aug 2001 07:49:06 +0000
Subject: Re: Portability concerns
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-62060@lists.php.net to get a copy of this message
[Phil Driscoll <phil@dialsolutions.co.uk>] > I was going to send a post on this topic yesterday, but then I > deleted it, but maybe it is worth airing incase it prompts someone > whose brain is working better than mine was yesterday to rifine the > idea. > > 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 :) With such a php_portability() function, it would be _even_ harder to write portable library code (because you need to handle both settings). Two wrongs won't make this one right. :-) - Stig -- Stig Sæther Bakken <ssb@alltheweb.com> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.dev (#62060) next »