Re: PHP 4.0 Bug #4751: fopen within if is not executed

From: Date: Thu, 01 Jun 2000 10:43:45 +0000
Subject: Re: PHP 4.0 Bug #4751: fopen within if is not executed
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-19949@lists.php.net to get a copy of this message
>> I tried to open two files and check if both were opened: >> >> if ($source=fopen("data.txt","r") && >> $dest=fopen("data.tmp","w")) This is parsed by PHP as $source = (fopen("data.txt","r") && $dest=fopen("data.tmp","w")). So source becomes boolean. Use parentheses. -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.dev (#19949) next »