当前位置: 移动技术网 > IT编程>开发语言>PHP > [PHP] small example to show dynamic type change

[PHP] small example to show dynamic type change

2019年06月06日  | 移动技术网IT编程  | 我要评论

万盛经开区,当悍妇遇到孝子,刘进荣

when you declare one variable, the initial type is null, but the type can be changed by assign statement.

global $my_var;
echo gettype($my_var);

$my_var = new stdclass();
$my_var->name = 'test';
$my_var->city = 'china';

//$my_var['weather']= 'cold';

echo gettype($my_var);
var_dump($my_var);


如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网