php call stack

Which of the following will print out the PHP call stack?

Options:

 

  1. A    $e = new Exception;
  2.  
  3.       var_dump($e->debug());
  4.  
  5. B    $e = new Exception;
  6.  
  7.       var_dump($e->getTraceAsString());
  8.  
  9. C    $e = new Exception;
  10.  
  11.       var_dump($e->backtrace());
  12.  
  13. D    $e = new Exception;
  14.  
  15.       var_dump($e->getstring());

 

Answer   

Have a look on this

 

Leave a Reply