Bug #67519 [Com]: @include supresses even syntax errors in the include

From: Date: Sun, 06 Jul 2014 09:20:17 +0000
Subject: Bug #67519 [Com]: @include supresses even syntax errors in the include
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186490@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67519&edit=1 ID: 67519 Comment by: spam2 at rhsoft dot net Reported by: spam2 at rhsoft dot net Summary: @include supresses even syntax errors in the include Status: Not a bug Type: Bug Package: Scripting Engine problem PHP Version: 5.5.13 Block user comment: N Private report: N New Comment: did you read https://bugs.php.net/bug.php?id=7363 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 Previous Comments: ------------------------------------------------------------------------ [2014-07-05 23:01:44] yohgaki@php.net @ 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/php.net/php-src/t.php on line 3 [yohgaki@dev php-src]$ cat t.php <?php function f() { echo $aaaa; } @f(); f(); ------------------------------------------------------------------------ [2014-06-25 21:09:54] spam2 at rhsoft dot net Description: ------------ https://bugs.php.net/bug.php?id=7363 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67519&edit=1

« previous php.bugs (#186490) next »