note 57033 added to language.constants.predefined

From: Date: Thu, 22 Sep 2005 04:59:21 +0000
Subject: note 57033 added to language.constants.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-95573@lists.php.net to get a copy of this message
the difference between __FUNCTION__ and __METHOD__ as in PHP 5.0.4 is that __FUNCTION__ returns only the name of the function while as __METHOD__ returns the name of the class alongwith the name of the function class trick { function doit() { echo __FUNCTION__; } function doitagain() { echo __METHOD__; } } $obj=new trick(); $obj->doit(); output will be ---- doit $obj->doitagain(); output will be ----- trick::doitagain ---- Manual Page -- http://www.php.net/manual/en/language.constants.predefined.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57033 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57033&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57033&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95573) next »