php 对象可以作为参数来传递

<?php
define('MY_SESS_TIME', 3600); //SESSION 生存时长
//类定义
class test
{
public $he="hechunhau";
}
function Ftest($test){
echo $test->he;
}
$in=new test();
Ftest($in)
?>

posted @ 2013-05-04 14:42  hechunhua  阅读(978)  评论(0编辑  收藏  举报