|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-25 09:11 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Feb 03 23:00:01 2026 UTC |
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?