note 126279 added to function.require
| From: | MarcelBaur at main dot php dot net | Date: | Tue, 27 Jul 2021 09:08:19 +0000 |
| Subject: | note 126279 added to function.require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216667@lists.php.net to get a copy of this message | ||
If your included file returns a value, you can get it as a result from require(), i.e.
foo.php:
<?php
return "foo";
?>
$bar = require("foo.php");
echo $bar; // equals to "foo"
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 77.109.184.247)
----
Manual Page -- https://php.net/manual/en/function.require.php
Edit -- https://main.php.net/note/edit/126279
Del: integrated -- https://main.php.net/note/delete/126279/integrated
Del: useless -- https://main.php.net/note/delete/126279/useless
Del: bad code -- https://main.php.net/note/delete/126279/bad+code
Del: spam -- https://main.php.net/note/delete/126279/spam
Del: non-english -- https://main.php.net/note/delete/126279/non-english
Del: in docs -- https://main.php.net/note/delete/126279/in+docs
Del: other reasons-- https://main.php.net/note/delete/126279
Reject -- https://main.php.net/note/reject/126279
Search -- https://main.php.net/manage/user-notes.php