ID: 25908 Updated by: [EMAIL PROTECTED] Reported By: kyle at putnamcabinets dot com -Status: Open +Status: Bogus Bug Type: Class/Object related -Operating System: Debian GNU/Linux (Sid) +Operating System: * -PHP Version: 5.0.0b1 (beta1) +PHP Version: 5* 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 Duplicate of #25815, 25199 Previous Comments: ------------------------------------------------------------------------ [2003-10-19 04:03:37] kyle at putnamcabinets dot com This also causes some undesired behavior (aside from being strange): [EMAIL PROTECTED]:~$ php5 -n -r ' > class thing > { > protected $ribbit = 'ZOINKS'; > } > > class frog extends thing > { > function croak() > { > echo $this->ribbit; > } > } > > $f = new frog; > print_r($f);' frog Object ( [ribbit] => [ribbit:protected] => ZOINKS ) ------------------------------------------------------------------------ [2003-10-19 03:45:27] kyle at putnamcabinets dot com Description: ------------ Not sure if this is a bug, but certainly strange behavior. When class properties are mentioned in a function they are created even if the function is not called Reproduce code: --------------- php5 -n -r 'class frog { function croak() { echo $this->ribbit; } } $f = new frog; print_r($f);' Expected result: ---------------- frog Object ( ) Actual result: -------------- frog Object ( [ribbit] => ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25908&edit=1