function test(array $a,test $b){

/*...*/

}

class test{

/*...*/

}

 

test(array(),new test);

表示test函数的参数里,第一个参数必须是数组,第二个必须是test类的实体。php没有别的限定类型了,诸如string、integer这样的限定类型是没有的,只有数组和对象两种限定类型。

---
http://blog.csdn.net/ownfire/article/details/6750595

相关文章:

  • 2022-01-12
  • 2021-08-25
  • 2021-11-01
  • 2021-05-16
  • 2021-11-26
  • 2021-10-17
  • 2021-08-26
  • 2021-05-23
猜你喜欢
  • 2021-11-14
  • 2021-11-04
  • 2021-12-25
  • 2022-12-23
  • 2021-12-08
  • 2021-08-15
  • 2022-12-23
相关资源
相似解决方案