#38204 [Opn->Bgs]: self is a string
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)