1.与时间相关的

 ---使用strtotime()函数把你的字符串时间转化为unix时间戳,然后使用date()输出    

  $time_str   =   "2005-08-09   12:54:31";  

  $time   =   strtotime($time_str);  

  echo   date("Y-m-d",   $time); 

 ---date('w', mktime(0, 0, 0, $this->month, $this->day, $this->year ));


2.string to int

$str="123";

$value=(int)$str;