Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 9445

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Pseudo-types and variables used in this documentation</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="language.types.callable.html">Callbacks / Callables</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.types.type-juggling.html">Type Juggling</a></div>
 <div class="up"><a href="language.types.html">Types</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="language.pseudo-types" class="sect1">
 <h2 class="title">Pseudo-types and variables used in this documentation</h2> 
 <p class="para">
  Pseudo-types are keywords used in the PHP documentation to specify the types or values an argument can have. Please note that they are not primitives of the PHP language. So you cannot use pseudo-types as typehints in your own custom functions. 
 </p>
 <div class="sect2" id="language.types.mixed">
  <h3 class="title">mixed</h3>

  <p class="para">
   <em>mixed</em> indicates that a parameter may accept multiple (but
   not necessarily all) types.
  </p>

  <p class="para">
   <span class="function"><a href="function.gettype.html" class="function">gettype()</a></span> for example will accept all PHP types, while
   <span class="function"><a href="function.str-replace.html" class="function">str_replace()</a></span> will accept <span class="type"><a href="language.types.string.html" class="type string">string</a></span>s and
   <span class="type"><a href="language.types.array.html" class="type array">array</a></span>s.
  </p>

 </div>

 <div class="sect2" id="language.types.number">
  <h3 class="title">number</h3>

  <p class="para">
   <em>number</em> indicates that a parameter can be either
   <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> or <span class="type"><a href="language.types.float.html" class="type float">float</a></span>.
  </p>

 </div>

 <div class="sect2" id="language.types.callback">
  <h3 class="title">callback</h3>

  <p class="para">
   <span class="type"><a href="language.pseudo-types.html#language.types.callback" class="type callback">callback</a></span> pseudo-types was used in this documentation before
   <span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> type hint was introduced by PHP 5.4. It means exactly
   the same.
  </p>
  
 </div>
 
 <div class="sect2" id="language.types.array-object">
  <h3 class="title">array|object</h3>

  <p class="para">
   <em>array|object</em> indicates that a parameter can be either
   <span class="type"><a href="language.types.array.html" class="type array">array</a></span> or <span class="type"><a href="language.types.object.html" class="type object">object</a></span>.
  </p>

 </div>

 <div class="sect2" id="language.types.void">
  <h3 class="title">void</h3>

  <p class="para">
   <em>void</em> as a return type means that the return value is
   useless. <em>void</em> in a parameter list means that the function
   doesn&#039;t accept any parameters. As of PHP 7.1 <em>void</em> is accepted as a function return type hint.
  </p>

 </div>

 <div class="sect2" id="language.types.dotdotdot">
  <h3 class="title">...</h3>

  <p class="para">
   <code class="parameter">$...</code> in function prototypes means
   <em>and so on</em>. This variable name is used when a function can
   take an endless number of arguments.
  </p>

 </div>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="language.types.callable.html">Callbacks / Callables</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.types.type-juggling.html">Type Juggling</a></div>
 <div class="up"><a href="language.types.html">Types</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>