<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.intlchar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'intlchar.hasbinaryproperty.php',
    1 => 'IntlChar::hasBinaryProperty',
    2 => 'Check a binary Unicode property for a code point',
  ),
  'up' => 
  array (
    0 => 'class.intlchar.php',
    1 => 'IntlChar',
  ),
  'prev' => 
  array (
    0 => 'intlchar.getunicodeversion.php',
    1 => 'IntlChar::getUnicodeVersion',
  ),
  'next' => 
  array (
    0 => 'intlchar.isalnum.php',
    1 => 'IntlChar::isalnum',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/intlchar/hasbinaryproperty.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intlchar.hasbinaryproperty" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlChar::hasBinaryProperty</h1>
  <p class="verinfo">(PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">IntlChar::hasBinaryProperty</span> &mdash; <span class="dc-title">Check a binary Unicode property for a code point</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlchar.hasbinaryproperty-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>IntlChar::hasBinaryProperty</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$codepoint</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$property</code></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></span></div>

  <p class="para rdfs-comment">
   Checks a binary Unicode property for a code point.
  </p>
  <p class="para">
   Unicode, especially in version 3.2, defines many more properties than the original set in UnicodeData.txt.
  </p>
  <p class="para">
   The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD)
   and Unicode Technical Reports (UTR). For details about the properties see
   <a href="http://www.unicode.org/ucd/" class="link external">&raquo;&nbsp;http://www.unicode.org/ucd/</a>.
   For names of Unicode properties see the UCD file PropertyAliases.txt.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlchar.hasbinaryproperty-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">codepoint</code></dt>
    <dd>
     <p class="para">The <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> codepoint value (e.g. <code class="literal">0x2603</code> for <em>U+2603 SNOWMAN</em>), or the character encoded as a UTF-8 <span class="type"><a href="language.types.string.php" class="type string">string</a></span> (e.g. <code class="literal">&quot;\u{2603}&quot;</code>)</p>
    </dd>
   
   
    <dt><code class="parameter">property</code></dt>
    <dd>
     <p class="para">The Unicode property to lookup (see the <code class="literal">IntlChar::PROPERTY_*</code> constants).</p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlchar.hasbinaryproperty-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> according to the binary Unicode property value for <code class="parameter">codepoint</code>.
   Also <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if <code class="parameter">property</code> is out of bounds or if the Unicode version does not have data for
   the property at all, or not for this code point. Returns <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-intlchar.hasbinaryproperty-examples">
  <h3 class="title">示例</h3>
  <div class="example" id="example-1">
   <p><strong>示例 #1 Testing different properties</strong></p>
   <div class="example-contents">
    <div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">hasBinaryProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">"A"</span><span style="color: #007700">, </span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_ALPHABETIC</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">hasBinaryProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">"A"</span><span style="color: #007700">, </span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_CASE_SENSITIVE</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">hasBinaryProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">"A"</span><span style="color: #007700">, </span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_BIDI_MIRRORED</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">hasBinaryProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">"["</span><span style="color: #007700">, </span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_ALPHABETIC</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">hasBinaryProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">"["</span><span style="color: #007700">, </span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_CASE_SENSITIVE</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">hasBinaryProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">"["</span><span style="color: #007700">, </span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_BIDI_MIRRORED</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>以上示例会输出：</p></div>
   <div class="example-contents screen">
    <div class="examplescode"><pre class="examplescode">bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
bool(true)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-intlchar.hasbinaryproperty-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="intlchar.getintpropertyvalue.php" class="function" rel="rdfs-seeAlso">IntlChar::getIntPropertyValue()</a> - Get the value for a Unicode property for a code point</span></li>
    <li><span class="function"><a href="intlchar.getunicodeversion.php" class="function" rel="rdfs-seeAlso">IntlChar::getUnicodeVersion()</a> - Get the Unicode version</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>