- print_r: documentation ( source)
- get_class: documentation ( source)
<?php
namespace Test;
class trick
{
function doit()
{
print_r(__CLASS__ . '\r\n');
}
function doitagain()
{
print_r(get_class($this) . '\r\n');
}
}
$obj=new trick();
$obj->doit();
$obj->doitagain();