ID: 26182 Updated by: [EMAIL PROTECTED] Reported By: hongnk at hotmail dot com -Status: Open +Status: Assigned -Bug Type: Feature/Change Request +Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS -Assigned To: +Assigned To: andi New Comment:
This is a bug, not feature request. Andi: Assigned to you as reminder.. :) Previous Comments: ------------------------------------------------------------------------ [2003-11-27 12:06:33] [EMAIL PROTECTED] Reopen as feature request: Shouldn't creation of implicit public properties be an E_STRICE error? ------------------------------------------------------------------------ [2003-11-27 12:05:22] [EMAIL PROTECTED] PHP5 knows the concepts of implicit public properties and dynamic properties. Implicit public properties are properties that are declared by simply using them. Dynamic properties are properties that can be 'attached' to an object while using it. ------------------------------------------------------------------------ [2003-11-25 04:20:11] [EMAIL PROTECTED] Works as expected with PHP 4, fails with PHP 5. ------------------------------------------------------------------------ [2003-11-08 19:47:47] hongnk at hotmail dot com Description: ------------ Whenever a variable is refered anywhere inside a class under the form $this->varname, it is automatically created in class instances. Reproduce code: --------------- class A { function NotAConstructor(){ if(isset($this->x)){ //just for demo } } } $t=new A(); var_dump($t); Expected result: ---------------- object(a)#1 (0) { } Actual result: -------------- object(a)#1 (1) { ["x"]=> NULL } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26182&edit=1