This function uses a backtrace generated from debug_backtrace and so will not work at all in PHP < 4.3.0. The frame should reference the frame that contains the source of the error.
Results of debug_backtrace()
backtrace frame.
returns either array('file' => file, 'line' => line, 'function' => function name, 'class' => class name) or if this doesn't work, then false