#25108 [Opn->Asn]: include doesn't return the right value
| From: | derick@php.net | Date: | Sat, 16 Aug 2003 15:34:28 +0000 |
| Subject: | #25108 [Opn->Asn]: include doesn't return the right value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46020@lists.php.net to get a copy of this message | ||
ID: 25108
Updated by: derick@php.net
Reported By: mailling at gmx dot co dot uk
-Status: Open
+Status: Assigned
Bug Type: Scripting Engine problem
Operating System: Windows 2000
PHP Version: 4CVS-2003-08-16 (stable)
-Assigned To:
+Assigned To: derick
New Comment:
Having a look at this...
Previous Comments:
------------------------------------------------------------------------
[2003-08-16 09:32:59] mailling at gmx dot co dot uk
Description:
------------
It seems that the variable returned by a correct insert changed from
the last PHP version. Is it a change in the behavior or a bug?
If I include a file and everything is fine, it returns NULL, but it
should return 1 or true (it does true, but the documentation says 1)
Reproduce code:
---------------
// The file base.inc.php exists, base.inc.php2 doesn't
$a = require_once(PROJECT_BASE . '/include/base.inc.php');
$b = require_once(PROJECT_BASE . '/include/base.inc.php');
$c = include_once(PROJECT_BASE . '/include/base.inc.php2');
var_dump($a); // return NULL
var_dump($b); // return true
var_dump($c); // return false
Expected result:
----------------
true (or 1?)
true (or 1?)
false
Actual result:
--------------
NULL
true
false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25108&edit=1