#38204 [Opn->Bgs]: self is a string

From: Date: Tue, 25 Jul 2006 09:11:24 +0000
Subject: #38204 [Opn->Bgs]: self is a string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99851@lists.php.net to get a copy of this message
 ID:               38204
 Updated by:       tony2001@php.net
 Reported By:      info at rhalff dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Debian
 PHP Version:      5.1.4
 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:
------------------------------------------------------------------------

[2006-07-25 09:02:44] info at rhalff dot com

Description:
------------
self seems te be a string until a method is called on it.

this makes it impossible to get any information about self at all.

Reproduce code:
---------------
<?php
class Heh {
 
    static function hi() {
        echo "Type of self is: ".gettype(self)."\n";
        var_dump(self);
        echo "Calling method huh, on self which is a string!?\n";
        self::huh();
    }
 
    static function huh() {
        echo "huh?\n";
    }
 
}
 
Heh::hi();

Expected result:
----------------
self is anything but a string.

Actual result:
--------------
Type of self is: string
string(4) "self"
Calling method huh, on self which is a string!?
huh?



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


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


Thread (2 messages)

« previous php.bugs (#99851) next »