gpt4 book ai didi

PHP:如何按名称创建类?

转载 作者:行者123 更新时间:2023-12-04 15:47:41 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Php dynamic class construction

我如何根据名称从类中创建对象?

像这样

$name = "test";
$test = "text from var";
print ${$name};

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com