Tracing with Xdebug

Author Topic: Tracing with Xdebug  (Read 464 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 159
  • Karma: 0
    • Hot Shaper
Tracing with Xdebug
« on: 05-18-2016, 00:02:36 »
Much of the Xdebug functionality is in the form of extra debugging statements that you can use to get extra information about your application. For example, you can find out what class, method,or function called the current context, and from which file and line that call originated.

Quote
<?php
class MyClass {
public function myCaller($other) {
$other->myCallee();
}
}
class MyOther {
public function myCallee() {
printf("%s", xdebug_call_class());
printf("::%s", xdebug_call_function());
printf(" in %s", xdebug_call_file());
printf(":%s\n", xdebug_call_line());
}
}
$a = new MyClass();
$b = new MyOther();
$a->myCaller($b);


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
587 Views
Last post 07-23-2016, 06:38:41
by chinmay.sahoo