|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67519 @include supresses even syntax errors in the include
Submitted: 2014-06-25 21:09 UTC Modified: 2014-07-05 23:01 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: spam2 at rhsoft dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.5.13 OS:
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: spam2 at rhsoft dot net
New email:
PHP Version: OS:


 [2014-06-25 21:09 UTC] spam2 at rhsoft dot net
that happens again

@include() in __get and __autoload leads to supress any errors in the included files which is wrong - @include is meant to save multiple and expsensive filesystem-operations by enforce if(file_exists(){include()} but *not* to supress any warings and even fatal errors inside the includeed code if it don't fail

Expected result:
supress warnings if includes don#t exists but not runtime and parse errors in included code

Actual result:
a white page in many cases because @include supresses recursive


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-05 23:01 UTC]
-Status: Open +Status: Not a bug
 [2014-07-05 23:01 UTC]
@ operator is supposed to turn off all errors until it returns to it.

[yohgaki@dev php-src]$ php -d error_reportring=-1 t.php
PHP Notice:  Undefined variable: aaaa in /home/yohgaki/workspace/ext/git/oss/ on line 3
[yohgaki@dev php-src]$ cat t.php
function f() {
  echo $aaaa;


 [2014-07-06 09:20 UTC] spam2 at rhsoft dot net
did you read

your comment with "@f();" and "f();" makes no sense
thats completly different to @include()

and it si completly *inconsistent* what is supressed in includes, parse errors are supressed, methods of classes most of the time correctly work with E_ALL as expected
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun May 26 03:01:26 2019 UTC