• 冒险村物语
  • 英雄无敌3塔防
  • 驾考家园手游

[PHP] small example to show dynamic type change

2015-05-27

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);


(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)

人气推荐

知识阅读

精彩推荐

  • 游戏
  • 软件
查看更多>>