Pseudotypes in PHP

WBOY
Release: 2016-07-29 08:59:51
Original
1378 people have browsed it

1.mixed

mixed indicates that a parameter can accept multiple (but not necessarily all) different types.

For example, gettype() can accept all PHP types.
2.number
number indicates that a parameter can be integer or float.

3.callback

Same as the way callable is used after PHP 5.4
4.void

void as a return type means that the return value of the function is useless.

void as parameter list means the function does not accept any parameters.


5. "..."

In the function prototype, $... means etc.

Use this variable name when a function can accept any number of parameters.

The above introduces the pseudo-types in PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!