ID:               47672
 Updated by:       j...@php.net
 Reported By:      jimmyp2 at freemail dot gr
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: windows 2003 std edition sp2
 PHP Version:      5.2.9
 New Comment:

Expected, you don't get notice about it since you never use the class.
The constant is checked once you do '$foo = new TestClass;'.


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

[2009-03-16 12:14:14] jimmyp2 at freemail dot gr

Description:
------------
Hello,

while testing this new release i noticed that declaring a public
attribute the way is shown in the "Reproduce code" section below no
error/exception is issued by the scripting engine's parser. Is this a
normal  behaviour ?

Web server used : Apache v. 2.2.11
PHP version     : 5.2.9-1


Thank you.


Reproduce code:
---------------
<?php
error_reporting(E_ALL);
class TestClass
{
    public $var1 = YTRTWTRT; // notice !!! the value is not quoted 
                             // and no constant with such name exists.
}
?>


Expected result:
----------------
a parser error issued.



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


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

Reply via email to