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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Dec 21 18:01:29 2024 UTC