com doc/zh: 更新 is_bool(): reference /var/functions/is-bool.xml

[email protected] (Bole Chen) Sat, 20 Feb 2021 08:45:38 +0000
Newsgroups php.doc.zh
Message-ID <[email protected]>
Commit:    be485e56d282e6a3a72994d171af3829d5ecae87=0AAuthor:    =E8=92=
=8B=E6=96=87=E5=81=A5 <[email protected]>         Sat, 20 Feb 2021 15:32:16 =
+0800=0ACommitter: Bole Chen <[email protected]>      Sat, 20 Feb 2021 16:45:=
38 +0800=0AParents:   4787d5bb965bd2b08caf7beb5f896d61421d46be=0ABranches: =
 master=0A=0ALink:       http://git.php.net/?p=3Ddoc/zh.git;a=3Dcommitdiff;=
h=3Dbe485e56d282e6a3a72994d171af3829d5ecae87=0A=0ALog:=0A=E6=9B=B4=E6=96=
=B0 is_bool()=0A=0AChanged paths:=0A  M  reference/var/functions/is-bool.xm=
l=0A=0A=0ADiff:=0Adiff --git a/reference/var/functions/is-bool.xml b/refere=
nce/var/functions/is-bool.xml=0Aindex 83513592..c92b4b19 100644=0A--- a/ref=
erence/var/functions/is-bool.xml=0A+++ b/reference/var/functions/is-bool.xm=
l=0A@@ -1,56 +1,84 @@=0A <?xml version=3D"1.0" encoding=3D"utf-8"?>=0A <!--=
 $Revision$ -->=0A <!-- $Author$ -->=0A-<!-- EN-Revision: n/a Maintainer: n=
io Status: ready -->=0A-<!-- splitted from ./en/functions/var.xml, last cha=
nge in rev 1.19 -->=0A-  <refentry xml:id=3D"function.is-bool" xmlns=3D"htt=
p://docbook.org/ns/docbook">=0A-   <refnamediv>=0A-    <refname>is_bool</re=
fname>=0A-     <refpurpose>=0A-      =E6=A3=80=E6=B5=8B=E5=8F=98=E9=87=
=8F=E6=98=AF=E5=90=A6=E6=98=AF=E5=B8=83=E5=B0=94=E5=9E=8B=0A-     </refpurp=
ose>=0A-    </refnamediv>=0A-    <refsect1>=0A-     <title>=E6=8F=8F=
=E8=BF=B0</title>=0A-     <methodsynopsis>=0A-       <type>bool</type><meth=
odname>is_bool</methodname>=0A-       <methodparam><type>mixed</type><param=
eter>var</parameter></methodparam>=0A-     </methodsynopsis>=0A-     <para>=
=0A-      =E5=A6=82=E6=9E=9C <parameter>var</parameter>=0A-      =E6=98=
=AF <type>boolean</type> =E5=88=99=E8=BF=94=E5=9B=9E &true;=E3=80=82=0A-   =
  </para>=0A-     <para>=0A-      <example>=0A-      <title><function>is_bo=
ol</function> =E7=A4=BA=E4=BE=8B</title>=0A-      <programlisting role=3D"p=
hp">=0A+<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintain=
er: nio Status: ready -->=0A+<refentry xml:id=3D"function.is-bool" xmlns=3D=
"http://docbook.org/ns/docbook">=0A+ <refnamediv>=0A+  <refname>is_bool</re=
fname>=0A+  <refpurpose>=0A+   =E6=A3=80=E6=B5=8B=E5=8F=98=E9=87=8F=
=E6=98=AF=E5=90=A6=E6=98=AF=E5=B8=83=E5=B0=94=E5=80=BC=0A+  </refpurpose>=
=0A+ </refnamediv>=0A+ <refsect1 role=3D"description">=0A+  &reftitle.descr=
iption;=0A+  <methodsynopsis>=0A+   <type>bool</type><methodname>is_bool</m=
ethodname>=0A+   <methodparam><type>mixed</type><parameter>value</parameter=
></methodparam>=0A+  </methodsynopsis>=0A+  <para>=0A+   =E6=A3=80=E6=9F=
=A5=E5=8F=98=E9=87=8F=E6=98=AF=E5=90=A6=E4=B8=BA=E5=B8=83=E5=B0=94=E5=80=
=BC=E3=80=82=0A+  </para>=0A+ </refsect1>=0A+ <refsect1 role=3D"parameters"=
>=0A+  &reftitle.parameters;=0A+  <para>=0A+   <variablelist>=0A+    <varli=
stentry>=0A+     <term><parameter>value</parameter></term>=0A+     <listite=
m>=0A+      <para>=0A+       =E8=A6=81=E6=A3=80=E6=9F=A5=E7=9A=84=E5=8F=
=98=E9=87=8F=E3=80=82=0A+      </para>=0A+     </listitem>=0A+    </varlist=
entry>=0A+   </variablelist>=0A+  </para>=0A+ </refsect1>=0A+ <refsect1 rol=
e=3D"returnvalues">=0A+  &reftitle.returnvalues;=0A+  <para>=0A+   =
=E5=A6=82=E6=9E=9C <parameter>value</parameter> =E6=98=AF=E5=B8=83=E5=B0=
=94=E5=80=BC=E5=88=99=E8=BF=94=E5=9B=9E &true; =EF=BC=8C=E5=90=A6=E5=88=
=99=E8=BF=94=E5=9B=9E &false; =E3=80=82=0A+  </para>=0A+ </refsect1>=0A+ <r=
efsect1 role=3D"examples">=0A+  &reftitle.examples;=0A+  <para>=0A+   <exam=
ple>=0A+    <title><function>is_bool</function> =E7=A4=BA=E4=BE=8B</title>=
=0A+    <programlisting role=3D"php">=0A <![CDATA[=0A <?php=0A $a =3D false=
;=0A $b =3D 0;=0A =0A-// =E5=9B=A0=E4=B8=BA $a =E6=98=AF=E5=B8=83=E5=B0=
=94=E5=9E=8B=EF=BC=8C=E6=89=80=E4=BB=A5=E7=BB=93=E6=9E=9C=E4=B8=BA=E7=9C=
=9F=0A-if (is_bool($a)) {=0A-    print "Yes, this is a boolean";=0A+// =
=E5=9B=A0=E4=B8=BA $a =E6=98=AF=E5=B8=83=E5=B0=94=E5=80=BC=EF=BC=8C=
=E6=89=80=E4=BB=A5=E7=BB=93=E6=9E=9C=E4=B8=BA true=0A+if (is_bool($a) =3D=
=3D=3D true) {=0A+    echo "Yes, this is a boolean";=0A }=0A =0A-// =
=E5=9B=A0=E4=B8=BA $b =E4=B8=8D=E6=98=AF=E5=B8=83=E5=B0=94=E5=9E=8B=
=EF=BC=8C=E6=89=80=E4=BB=A5=E7=BB=93=E6=9E=9C=E4=B8=BA=E9=9D=9E=E7=9C=9F=0A=
-if (is_bool($b)) {=0A-    print "Yes, this is a boolean";=0A+// =E5=9B=
=A0=E4=B8=BA $b =E4=B8=8D=E6=98=AF=E5=B8=83=E5=B0=94=E5=80=BC=EF=BC=8C=
=E6=89=80=E4=BB=A5=E7=BB=93=E6=9E=9C=E4=B8=BA false=0A+if (is_bool($b) =3D=
=3D=3D false) {=0A+    echo "No, this is not a boolean";=0A }=0A ?>=0A ]]>=
=0A-       </programlisting>=0A-      </example>=0A-     </para>=0A-     <p=
ara>=0A-     =E5=8F=82=E8=A7=81 =0A-     <function>is_array</function>=
=E3=80=81<function>is_float</function>=E3=80=81<function>is_int</function>=
=E3=80=81<function>is_integer</function>=E3=80=81<function>is_string</funct=
ion>=0A-     =E5=92=8C <function>is_object</function>=E3=80=82=0A-    </par=
a>=0A-   </refsect1>=0A-  </refentry>=0A-=0A+    </programlisting>=0A+   </=
example>=0A+  </para>=0A+ </refsect1>=0A+ <refsect1 role=3D"seealso">=0A+  =
&reftitle.seealso;=0A+  <para>=0A+   <simplelist>=0A+    <member><function>=
is_float</function></member>=0A+    <member><function>is_int</function></me=
mber>=0A+    <member><function>is_string</function></member>=0A+    <member=
><function>is_object</function></member>=0A+    <member><function>is_array<=
/function></member>=0A+   </simplelist>=0A+  </para>=0A+ </refsect1>=0A+</r=
efentry>=0A <!-- Keep this comment at the end of the file=0A Local variable=
s:=0A mode: sgml=0A