note 84108 added to function.include-once
| From: | roach dot scott+spam at googlemail dot com | Date: | Sat, 28 Jun 2008 00:22:28 +0000 |
| Subject: | note 84108 added to function.include-once | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140890@lists.php.net to get a copy of this message | ||
If you include a file that does not exist with include_once, the return result will be false.
If you try to include that same file again with include_once the return value will be true.
Example:
<?php
var_dump(include_once 'fakefile.ext'); // bool(false)
var_dump(include_once 'fakefile.ext'); // bool(true)
?>
This is because according to php the file was already included once (even though it does not exist).
----
Server IP: 209.41.74.194
Probable Submitter: 70.122.37.35
----
Manual Page -- http://www.php.net/manual/en/function.include-once.php
Edit -- https://master.php.net/note/edit/84108
Del: integrated -- https://master.php.net/note/delete/84108/integrated
Del: useless -- https://master.php.net/note/delete/84108/useless
Del: bad code -- https://master.php.net/note/delete/84108/bad+code
Del: spam -- https://master.php.net/note/delete/84108/spam
Del: non-english -- https://master.php.net/note/delete/84108/non-english
Del: in docs -- https://master.php.net/note/delete/84108/in+docs
Del: other reasons-- https://master.php.net/note/delete/84108
Reject -- https://master.php.net/note/reject/84108
Search -- https://master.php.net/manage/user-notes.php