update page now
PHP 8.4.20 Released!

Voting

: max(eight, two)?
(Example: nine)

The Note You're Voting On

vijaykoul_007 at rediffmail dot com
20 years ago
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

<< Back to user notes page

To Top