php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #314 @include/@require gives "Parse error"
Submitted: 1998-04-25 11:26 UTC Modified: 1998-04-25 12:23 UTC
From: doka at webest dot com (Vladimir Litovka) Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Release Candidate 4 OS: Any
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: doka at webest dot com (Vladimir Litovka)
New email:
PHP Version: OS:

 

 [1998-04-25 11:26 UTC] doka at webest dot com (Vladimir Litovka)
Hello!

 There is error in RC4: when using

 <? @include("somefile"); ?> or
 <? @require("somefile"); ?>

 PHP gives parse error instead of silent continuation.
 I'm not sure, is this error or feature ;)

 BTW I need to do: @include("somefile") and get result:
 if file exists, include it; if don't exist, silently
 continue work. Is this possible?

/doka

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-25 12:23 UTC] zeev
It's not a feature nor an error, that's the correct behavior.

@ is a modifier for expressions, include() and require()
are not expressions, but statements.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC