note 110625 added to function.include
| From: | sergei dot solomonov at gmail dot com | Date: | Wed, 14 Nov 2012 09:51:27 +0000 |
| Subject: | note 110625 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191927@lists.php.net to get a copy of this message | ||
File settings.php:
<?php
return array('some', 'settings', '...');
?>
Test 1
-----------------------------------------
<?php
var_dump(
$a = include 'settings.php',
$b = include 'settings.php'
);
?>
Output:
---------
array(3) {
[0] =>
string(4) "some"
[1] =>
string(8) "settings"
[2] =>
string(3) "..."
}
array(3) {
[0] =>
string(4) "some"
[1] =>
string(8) "settings"
[2] =>
string(3) "..."
}
Test 2
-----------------------------------------
<?php
var_dump(
$a = include_once 'settings.php',
$b = include_once 'settings.php'
);
?>
Output:
---------
array(3) {
[0] =>
string(4) "some"
[1] =>
string(8) "settings"
[2] =>
string(3) "..."
}
bool(true) <--- !!!!!
----
Server IP: 69.147.83.199
Probable Submitter: 194.190.59.63
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- https://master.php.net/note/edit/110625
Del: integrated -- https://master.php.net/note/delete/110625/integrated
Del: useless -- https://master.php.net/note/delete/110625/useless
Del: bad code -- https://master.php.net/note/delete/110625/bad+code
Del: spam -- https://master.php.net/note/delete/110625/spam
Del: non-english -- https://master.php.net/note/delete/110625/non-english
Del: in docs -- https://master.php.net/note/delete/110625/in+docs
Del: other reasons-- https://master.php.net/note/delete/110625
Reject -- https://master.php.net/note/reject/110625
Search -- https://master.php.net/manage/user-notes.php