OK so is there a way in php do track function calls such as
function Tracker($name,$returnedValue,$file,$line)
{
echo $name . '() was called and returned a ' . typeof(returnedValue);
}
function test(){}
test();
The reason for this is to send a custom framework data type back so another example would be
$resource = fopen('php://stdin'); //This would return an instance of (Object)Resource.
if($resource->type == 'fopen')
{
//Code
}
I have never seen anyway to do this but does anyone know if it is possible ?