Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道您不必为 PHP 变量指定类型,但可以这样做吗?无需初始化,只需键入强制转换。
class A { .... } class B { public var foo= A; }
谢谢你 !
你可以这样做(字符串)$a; 它强制代码接收这种类型。
您在寻找 settype() PHP 函数吗?