Re: Re: New PHP extension
| From: | Derick Rethans | Date: | Mon, 17 Feb 2003 06:26:06 +0000 |
| Subject: | Re: Re: New PHP extension | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13399@lists.php.net to get a copy of this message | ||
On Sun, 16 Feb 2003, Bertrand Mansion wrote:
<snip>
> > Now, having $CODELIB be a super global allows us two luxuries in this case.
> > 1) When we include file1.php, we don't have to use the global keyword which
> > makes a reference and is slower than our second option copying the variable.
> > Also, we don't have to use the $GLOBALS array which makes working with
> > strings harder and increases our code complexity. 2) We don't have to worry
> > about what variables are used in the includes at the top of file1.php. As
> > you can see, it unconditionally includes two files. We have 5-6 more
> > variables defined in our prepend like this.
> >
> > Now, while you may find our code layout and usage to be wrong, remember, I
> > am submitting this as a PECL extension, which is totally optional for people
> > to install and use. I am not proposing this be a part of the PHP core,
> > which IMO, would be a mistake.
> >
> > Whether this is put in PECL or not, we will continue to use it.
>
> I think this is a risky extension, I don't like the idea of messing with
> super globals. Of course, this is PECL and people are free to use it or not
> but I would be scared if lots of people start to use it because there are
> other cleaner ways to solve this problem. This extension might cause
> portability or evolution problems in the future.
I tend to agree with this, should could all have been solved with a
simple constant... I'm not so sure if this should even be in PECL...
Derick
--
-------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
JDI Media Solutions http://www.jdimedia.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
-------------------------------------------------------------------------