Test debug_backtrace() function
Some checks reported errors
The build has failed.

This commit is contained in:
2018-08-07 15:47:14 +02:00
parent cdc58f2795
commit 80f376af62
2 changed files with 36 additions and 0 deletions

23
tests/debug_backtrace.aer Normal file
View File

@@ -0,0 +1,23 @@
class Main {
function __construct() {
$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");
}
}
new Main();