Test debug_backtrace() function
The build has failed.
Details
The build has failed.
Details
This commit is contained in:
parent
cdc58f2795
commit
80f376af62
|
@ -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();
|
|
@ -0,0 +1,13 @@
|
||||||
|
Array(1) {
|
||||||
|
[0] =>
|
||||||
|
First A
|
||||||
|
}
|
||||||
|
Array(1) {
|
||||||
|
[0] =>
|
||||||
|
Second A
|
||||||
|
}
|
||||||
|
Array(1) {
|
||||||
|
[0] =>
|
||||||
|
Third A
|
||||||
|
}
|
||||||
|
First A, Second A, Third A
|
Loading…
Reference in New Issue