Re: Re: cvs: php4 /pear System.php
| From: | Pierre-Alain Joye | Date: | Mon, 26 Aug 2002 00:08:38 +0000 |
| Subject: | Re: Re: cvs: php4 /pear System.php | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-8660@lists.php.net to get a copy of this message | ||
On Sun, 25 Aug 2002 16:41:21 -0700 (PDT)
Rasmus Lerdorf <rasmus@php.net> wrote:
> > + if (getenv('TEMP')) {
> > + return getenv('TEMP');
>
> This is horrendous code.
do not kill me, pls :-)
> How about:
>
> if ($var = getenv('TEMP')) {
> return $var;
> }
>
> Saves an expensive getenv() call.
>
> Or even better:
>
> if (($var=$_ENV['TEMP']) || $var=getenv('TEMP')) {
> return $var;
> }
ooohohoh :) you re right. We quicly did it this evening to make a suitable pear command available
for tests under w32. I will optimize/clean all these stuffs as soon we ll find a solution for all
current failures under w32.
thanks for the comments,
pa