- 实现 class_exists 函数的静态分析优化,直接返回已知类的存在性 - 添加 get_class 函数支持,为类型化对象生成字符指针 - 优化 function_exists 函数检查逻辑,提前处理原生函数 - 添加 get_class 测试用例验证功能 - 更新基准测试代码,添加 class_exists 性能测试 - 移除未使用的宏定义,优化常量定义方式pull/1/head
parent
af42804d8f
commit
26a0439f42
3 changed files with 41 additions and 5 deletions
@ -0,0 +1,17 @@ |
||||
--TEST-- |
||||
class const 001 |
||||
--FILE-- |
||||
<?php |
||||
class Worker |
||||
{ |
||||
public const BAR = "string constant"; |
||||
} |
||||
|
||||
function main() |
||||
{ |
||||
$o = new Worker; |
||||
var_dump(get_class($o)); |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
string(6) "Worker" |
||||
Loading…
Reference in new issue