Voting

: min(two, one)?
(Example: nine)

The Note You're Voting On

jlammertink at gmail dot com
14 years ago
I use this simple but effective function so i can see which method in the child class called the current method (in the parent class).

<?php
function get_caller_method()
{
$traces = debug_backtrace();

if (isset(
$traces[2]))
{
return
$traces[2]['function'];
}

return
null;
}
?>

<< Back to user notes page

To Top