$stk2 = new stack2(); echo $stk2->c(); } function b() { var_dump(xdebug_get_function_stack()); // Displays the function's call flow or stack. } } class stack2 { function c() { $stk = new stack(); //Call to class "Stack" echo $stk->b(); } } $a = ''; $stk = new stack(); $res = $stk->a($a); xdebug_print_function_stack('Your Message'); //To Print "Your Message" text in a message. /* Used to Findout the time taken to execute code. */ echo '<br><br>' . xdebug_time_index() . '<br>'; //Display the start time. for ($i = 0; $i < 100; $i++) { // anything. } echo xdebug_time_index() . '<br><br>'; //Display the end time.