note 96792 deleted from function.require-once by danbrown
| From: | danbrown@php.net | Date: | Wed, 17 Mar 2010 03:34:05 +0000 |
| Subject: | note 96792 deleted from function.require-once by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-167119@lists.php.net to get a copy of this message | ||
Note Submitter: maxime dot faye at gmail dot com
----
Note that require_once() does NOT work with return value as require() does :
<?php
//include.inc.php
$aConf = array('ConfValue' => true);
return $aConf;
//main.php
$aConfArray = require_once('include.inc.php');
print_r($aConfArray);
//Will display '1' and not 'array([ConfValue] => 1)'
?>