[PHP] small example to show dynamic type change
程序员文章站
2022-05-17 08:20:25
...
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);
上一篇: js实现html table 行,列锁定的简单实例
下一篇: 【实战】sphinx索引合并的脚本