ID:               24388
 Updated by:       [EMAIL PROTECTED]
 Reported By:      xbite at exonium dot net
 Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: Linux - Slackware 8.0
 PHP Version:      4.3.2
 New Comment:

[EMAIL PROTECTED] derick]$ php
<?php
class F {
  var $property = "some value";
  var $property = "some other value";
}
?>
PHP Fatal error:  Cannot redeclare f::$property in - on line 4

As you see this works fine (with PHP-5.0.0dev).


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

[2003-06-29 13:08:18] xbite at exonium dot net

sorry for bad code -- not "class Class", try something else insted of
"Class".

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

[2003-06-29 13:00:18] [EMAIL PROTECTED]

It does:
[EMAIL PROTECTED] derick]$ php-4.3.3RC1 
<?php
class Class {
  var $property = "some value";
  var $property = "some other value";
}
?>
PHP Parse error:  parse error, expecting `T_STRING' in - on line 2


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

[2003-06-29 12:52:56] xbite at exonium dot net

Description:
------------
If you redefine class property, you don't get any errors.

Reproduce code:
---------------
class Class {
  var $property = "some value";
  var $property = "some other value";
}

Expected result:
----------------
PHP should generate an error.



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


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

Reply via email to