#47748 [Opn->Bgs]: creating class variable outside class definition
| From: | derick@php.net | Date: | Sun, 22 Mar 2009 18:35:31 +0000 |
| Subject: | #47748 [Opn->Bgs]: creating class variable outside class definition | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134998@lists.php.net to get a copy of this message | ||
ID: 47748
Updated by: derick@php.net
Reported By: tompotts at itsosbroadband dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: W2k/Linux
PHP Version: 5.2.9
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
Previous Comments:
------------------------------------------------------------------------
[2009-03-22 18:20:30] tompotts at itsosbroadband dot co dot uk
Description:
------------
Seem to be able to extend instances outside class definition
Reproduce code:
---------------
class one{
public $vars;
}
$inst=new one;
$inst->newvar="should make error";
print $inst->newvar;
Expected result:
----------------
An error where the class is modified externally to its definition.
Actual result:
--------------
allows instance to be extended willynilly.
Not sure if this is language feature by design - doesnt feel right to
my view of OO.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47748&edit=1