Aer/tests/debug_backtrace.aer
belliash 029dd9bfb4
All checks were successful
The build was successful.
Several changes made:
* Do not overload entry point
 * Automatically call Program::__construct()
 * Automatically call Program::main();
 * Fix all tests
2018-08-12 12:52:35 +02:00

22 lines
375 B
Plaintext

class Program {
function main() {
$this->b($this->a('First A'), $this->a('Second A'), $this->a('Third A'));
}
function a($p) {
$backtrace = debug_backtrace();
if(isset($backtrace[0]['args'])) {
var_export($backtrace[0]['args']);
} else {
print("Cannot aquire arguments\n");
}
return $p;
}
function b($p1, $p2, $p3) {
print("$p1, $p2, $p3");
}
}