Test debug_backtrace() function
一些檢查回報了錯誤
The build has failed.

此提交包含在:
2018-08-07 15:47:14 +02:00
父節點 cdc58f2795
當前提交 80f376af62
共有 2 個檔案被更改,包括 36 行新增0 行删除

23
tests/debug_backtrace.aer 一般檔案
查看文件

@@ -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 一般檔案
查看文件

@@ -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