| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2003-11-25 04:20 UTC] sniper@php.net
  [2003-11-27 12:05 UTC] helly@php.net
  [2003-11-27 12:06 UTC] helly@php.net
  [2003-12-01 07:10 UTC] sniper@php.net
  [2003-12-16 03:01 UTC] sniper@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 07:00:01 2025 UTC | 
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 }