php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #2365 include_once request
Submitted: 1999-09-23 07:38 UTC Modified: 2000-07-18 07:56 UTC
From: tma-p at gatehouse dot dk Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.12 OS: WinNT 4.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tma-p at gatehouse dot dk
New email:
PHP Version: OS:

 

 [1999-09-23 07:38 UTC] tma-p at gatehouse dot dk
It would be nice to have an include_once or similar statement that included a file exactly once. This would make it easier to avoid redefinitions when including a file from several places.

Currently I use a 
<PRE>
if (!isset($guard_variable)): ... endif;
</PRE>
construction which works OK, but is a bit unelegant.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-18 07:56 UTC] hholzgra at cvs dot php dot net
implemented in PHP 4 / Zend
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC