|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #733 return in global scope causes parser error
Submitted: 1998-09-10 01:11 UTC Modified: 2000-07-05 02:34 UTC
From: walton at nordicdms dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.3 OS: FreeBSD 2.2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: walton at nordicdms dot com
New email:
PHP Version: OS:


 [1998-09-10 01:11 UTC] walton at nordicdms dot com
Including or requiring a file that looks like this:

  if (defined('MY_INCLUDE_FILE')) { 
  define('MY_INCLUDE_FILE', 1);


causes a parser error on the last line of the main script if this file is included more than once.  The parser error can be silenced by adding one } to the end of the main script for each time that "return" executes.

For example, if that file is included 3 times, }} must be added to the end of the script.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-05 02:34 UTC] rasmus at cvs dot php dot net
Fixed long ago
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Oct 05 02:01:24 2023 UTC