note 123323 deleted from function.include-once by cmb
| From: | cmb@php.net | Date: | Fri, 09 Nov 2018 08:41:47 +0000 |
| Subject: | note 123323 deleted from function.include-once by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-209653@lists.php.net to get a copy of this message | ||
Note Submitter: m_r_lister at yahoo dot com
----
<?php
/** The following will result in false for both instances because the second instance is overwriting
the first.
Which means that the included file is only loading for the first time during the second instance.
**/
$result = include_once 'fakefile.php'; // this will result as false
$result = include_once 'fakefile.php'; // this will result as false
/** include_once will result in false on the first instance of it. **/
$result1 = include_once 'fakefile.php'; // this will result as false
/** include_once will result in true on the second instance of it. **/
$result2 = include_once 'fakefile.php'; // this will result as true