ID:               36528
 Updated by:       [EMAIL PROTECTED]
 Reported By:      arachnion at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      5.1.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

You are trying to set the error reporting in your script. Code is
executed *after* the whole file is parsed. Your statement will
therefore have no effect on the parsing stage. You will see an error if
you set E_STRICT in your php.ini.


Previous Comments:
------------------------------------------------------------------------

[2006-02-25 17:29:56] arachnion at gmail dot com

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>


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36528&edit=1

Reply via email to