$var1 = "Hello"; $var2 = "World"; var_dump($var1, $var2); // Output: string(5) "Hello" string(5) "World"
function addNumbers($num1, $num2){ $sum = $num1 + $num2; debug_print_backtrace(); return $sum; } addNumbers(5, 10); // Output: // #0 addNumbers(5, 10) called at [/path/to/file.php:6] // #1 include(/path/to/file.php) called at [/path/to/index.php:2]
$startTime = microtime(true); sleep(2); $endTime = microtime(true); $totalTime = $endTime - $startTime; echo "Execution time: " . $totalTime . " seconds"; // Output: Execution time: 2.0002348423004 secondsPHP Debug is a part of the Xdebug package library.