Merge branch 'master' of https://git.codingworkshop.eu.org/AerScript/Aer
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit is contained in:
commit
7711bdb6bc
23
tests/debug_backtrace.aer
Normal file
23
tests/debug_backtrace.aer
Normal 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();
|
13
tests/debug_backtrace.exp
Normal file
13
tests/debug_backtrace.exp
Normal file
|
@ -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
Block a user