ID:               31331
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mgkimsal at conduit-it dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: mandrake
 PHP Version:      5.0.2
 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:
------------------------------------------------------------------------

[2004-12-29 04:30:33] mgkimsal at conduit-it dot com

Description:
------------
$this behaviour is wrong...

It's showing the context of the calling object instead of its own
object (which doesn't exist if called statically).

Reproduce code:
---------------
<?
class myclass {

        function __construct() {
        }
        function __destruct() {
        }
        public function bar($foo) {
                print_r($this);
        }
}

class foo {
  public $prop = 'property';
  function docode() {
    myclass::bar('foo');
  }
}

$f = new foo();
$f->docode();

?>

Expected result:
----------------
I would expect to see nothing, or perhaps info on the mycode class.

Actual result:
--------------
I see info on the foo class.  :(


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


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

Reply via email to