随笔分类 -  PHP&&Mysql

摘要:public 表示全局,类内部外部子类都可以访问; 1 <?php 2 3 class Test{ 4 public $name='Janking', 5 $sex='male', 6 $age=23; 7 8 function __construct(){ 9 echo $this->age.'<br />'.$this->name.'<br />'.$this->sex.'<br />';10 }11 ... 阅读全文
posted @ 2013-05-14 10:55 琅琊丶 阅读(334) 评论(0) 推荐(0) 编辑
摘要:setType— 设置变量的类型bool settype ( mixed $var , string $type )将变量 var 的类型设置成 type 。type 的可能值为:“boolean” (或为“bool”,从 PHP 4.2.0 起) “integer” (或为“int”,从 PHP 4.2.0 起) “float” (只在 PHP 4.2.0 之后可以使用,对于旧版本中使用的“double”现已停用) “string” “array” “object” “null” (从 PHP 4.2.0 起) 如果成功则返回 TRUE,失败则返回 FALSE。intval(), float 阅读全文
posted @ 2013-05-10 11:57 琅琊丶 阅读(311) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示