File: pseudo-types.xml

package info (click to toggle)
php-doc 20140201-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 74,084 kB
  • ctags: 4,040
  • sloc: xml: 998,137; php: 20,812; cpp: 500; sh: 177; makefile: 63; awk: 28
file content (85 lines) | stat: -rw-r--r-- 2,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 324122 $ -->
<sect1 xml:id="language.pseudo-types">
 <title>Pseudo-types and variables used in this documentation</title> 

 <sect2 xml:id="language.types.mixed">
  <title>mixed</title>

  <para>
   <literal>mixed</literal> indicates that a parameter may accept multiple (but
   not necessarily all) types.
  </para>

  <para>
   <function>gettype</function> for example will accept all PHP types, while
   <function>str_replace</function> will accept <type>string</type>s and
   <type>array</type>s.
  </para>

 </sect2>

 <sect2 xml:id="language.types.number">
  <title>number</title>

  <para>
   <literal>number</literal> indicates that a parameter can be either
   <type>integer</type> or <type>float</type>.
  </para>

 </sect2>

 <sect2 xml:id="language.types.callback">
  <title>callback</title>

  <para>
   <type>callback</type> pseudo-types was used in this documentation before
   <type>callable</type> type hint was introduced by PHP 5.4. It means exactly
   the same.
  </para>
  
 </sect2>
 
 <sect2 xml:id="language.types.void">
  <title>void</title>

  <para>
   <literal>void</literal> as a return type means that the return value is
   useless. <literal>void</literal> in a parameter list means that the function
   doesn't accept any parameters.
  </para>

 </sect2>

 <sect2 xml:id="language.types.dotdotdot">
  <title>...</title>

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

 </sect2>
</sect1>
 
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->