|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-27 22:41 UTC] iliaa@php.net
[2003-11-12 10:34 UTC] mpn at illearth dot net
[2003-11-17 18:27 UTC] sniper@php.net
[2003-11-21 01:18 UTC] mpn at illearth dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 08:00:01 2025 UTC |
Description: ------------ To my knowledge, when using @ at a function/variable/etc, it sets error_reporting to 0 at that instance, and return, to its previous state, after that instance. Unfortunately, after the instance of @, instead of returning to what it was set at previously, it returns to what is set in php.ini Reproduce code: --------------- --y.php-- <?php // error_reporting is currently at E_ALL (set from php.ini) // Set error_reporting to 0 error_reporting(0); // Returns 0 here var_dump(error_reporting()); ?> --z.php-- <?php @require('./y.php'); // This returns 2047 (E_ALL) var_dump(error_reporting()); ?> Expected result: ---------------- Its expected that z.php should return 0 from the var_dump(), where it inherits its error_reporting value from y.php, but is currently returning 2047 (E_ALL) When I remove '@' from require('./y.php'); in z.php, it then works correctly.