Home > php教程 > php手册 > php拾遗: 类型约束

php拾遗: 类型约束

WBOY
Release: 2016-06-13 09:33:06
Original
729 people have browsed it

突然间什么都不想干,感觉就像来大姨夫一样。。但是又不能断了每个工作日都写博客的习惯。。所以今天水一下吧。

PHP用了快2年了,但是这东西竟然第一次看到,突然间,觉得自己有掉回战五渣的行列了。
翻开官方文档《类型约束》里面讲的非常清楚了。
总共就四种:类名接口数组callable (PHP 5.4起)
那些啥 int string 都不行。。
例子什么的 PHP 手册上已经讲的非常详细了,我也懒的写了,反正这东西就一个知识点,看一下就会了。。

其实,好久没写PHP,现在回头读读各大框架,真怀疑自己真的会PHP么、、

 

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template