|
发表于 2004-5-6 14:17:58
|
显示全部楼层
ref()是个函数,一般来说,这样的格式就是个函数拉。- ref (EXPR)
- Category: Miscellaneous
- Return Value: SCALAR, the data type of EXPR.
- Definition: Gets the data type of a variable. For example, 'ARRAY', 'CODE', 'GLOB', 'HASH', 'REF', or 'SCALAR' might be returned.
- If a variable was blessed with the bless() fuNCtion, then the new data type
- will be returned. The new data type will normally be a class name.
- $foobar = { };
- bless($foobar, 'ATMPCLASS');
- print "ref() \$foobar is now in class ", ref($foobar), "\n";
复制代码 最好能亲自动手运行一下给出的例子,这样就容易明白了。我E文不好,就不解释了 |
|