- 在原生函数调用周围添加 try-catch 块以处理 PlaceHolder 异常 - 添加对名称表达式类型的检查以正确解析静态方法调用 - 为动态类名静态方法调用实现字符串连接逻辑 - 添加静态方法调用功能的测试用例pull/1/head
parent
fd48162ab6
commit
1d6681ade3
2 changed files with 37 additions and 2 deletions
@ -0,0 +1,27 @@ |
||||
--TEST-- |
||||
static method |
||||
--FILE-- |
||||
<?php |
||||
class Http { |
||||
public static function input($data) { |
||||
var_dump($data); |
||||
} |
||||
} |
||||
|
||||
class Worker { |
||||
protected string $protocol = 'Http'; |
||||
|
||||
public function run() { |
||||
Http::input('http1.0'); |
||||
$this->protocol::input('http1.1'); |
||||
} |
||||
} |
||||
|
||||
function main() { |
||||
$worker = new Worker(); |
||||
$worker->run(); |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
string(7) "http1.0" |
||||
string(7) "http1.1" |
||||
Loading…
Reference in new issue