|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-25 17:36 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 22:00:01 2026 UTC |
Description: ------------ If I put "global $var;" in an included class definition, the parse error is not raised under "error_reporting( E_STRICT );". Reproduce code: --------------- //main.php <?php error_reporting( E_ALL & E_STRICT ); $var = null; include 'inc.php'; echo 'debug!'; //inc.php <?php class User { global $var; } Expected result: ---------------- Parse error: parse error, unexpected T_GLOBAL, expecting T_FUNCTION in C:\Program Files\xampp\htdocs\memoria\phpbug\inc.php on line 4 Actual result: -------------- <nothing>