note 77218 added to function.require-once

From: Date: Mon, 20 Aug 2007 17:33:35 +0000
Subject: note 77218 added to function.require-once
Groups: php.notes 
Request: Send a blank email to php-notes+get-129646@lists.php.net to get a copy of this message
Beware: As miqrogroove said below, require_once() is not independent of require() -- but vice versa, require() IS independent of require_once()! Let's turn miqrogroove's example around: echo.php <?php echo "42!<br />\n"; ?> test.php <?php require_once 'echo.php'; require 'echo.php'; // 42! // 42! ?> So: require_once() will NOT include a file previously included by require(), while require WILL include a file previously included by require_once. ---- Server IP: 212.124.37.9 Probable Submitter: 85.176.230.159 ---- Manual Page -- http://www.php.net/manual/en/function.require-once.php Edit -- https://master.php.net/note/edit/77218 Del: integrated -- https://master.php.net/note/delete/77218/integrated Del: useless -- https://master.php.net/note/delete/77218/useless Del: bad code -- https://master.php.net/note/delete/77218/bad+code Del: spam -- https://master.php.net/note/delete/77218/spam Del: non-english -- https://master.php.net/note/delete/77218/non-english Del: in docs -- https://master.php.net/note/delete/77218/in+docs Del: other reasons-- https://master.php.net/note/delete/77218 Reject -- https://master.php.net/note/reject/77218 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129646) next »