include_once() return values ?

From: Date: Wed, 26 Jul 2000 14:17:41 +0000
Subject: include_once() return values ?
Groups: php.dev 
Request: Send a blank email to php-dev+get-26298@lists.php.net to get a copy of this message
Hi All, Question: what would you expect include_once() to return on the second attempt to include the same file? On the first attempt it behaves like include(), returning the return value of the included file, or the int(1) if there is no return statement in the included file. At the moment include_once() always returns NULL on the second attempt so defensive coding like this wont work: if(!@include_once("$somefile"){ // handle failled include attempt } ( note that this example is based on ideas implemented in pear DB::connect() ) Is this intentional (feature request material) or bug report time ?

« previous php.dev (#26298) next »