跳转到主内容
websoft网络软件专家 - 深耕网络技术,打造实用软件!

[PHP] small example to show dynamic type change_PHP教程

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);
http://www.bkjia.com/PHPjc/735900.html www.bkjia.com true http://www.bkjia.com/PHPjc/735900.html TechArticle 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->nam...

相关文章