Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 8983

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>Get the property value for a given value name</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="intlchar.getpropertyname.html">IntlChar::getPropertyName</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intlchar.getpropertyvaluename.html">IntlChar::getPropertyValueName</a></div>
 <div class="up"><a href="class.intlchar.html">IntlChar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="intlchar.getpropertyvalueenum" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlChar::getPropertyValueEnum</h1>
  <p class="verinfo">(PHP 7)</p><p class="refpurpose"><span class="refname">IntlChar::getPropertyValueEnum</span> &mdash; <span class="dc-title">Get the property value for a given value name</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlchar.getpropertyvalueenum-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">int</span> <span class="methodname"><strong>IntlChar::getPropertyValueEnum</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$property</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   )</div>

  <p class="para rdfs-comment">
   Returns the property value integer for a given value name, as specified in the Unicode database file PropertyValueAliases.txt.
   Short, long, and any other variants are recognized.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Some of the names in PropertyValueAliases.txt will only be recognized with
    <strong><code>IntlChar::PROPERTY_GENERAL_CATEGORY_MASK</code></strong>, not
    <strong><code>IntlChar::PROPERTY_GENERAL_CATEGORY</code></strong>.
    These include:
    <ul class="simplelist">
     <li class="member">&quot;C&quot; / &quot;Other&quot;</li>
     <li class="member">&quot;L&quot; / &quot;Letter&quot;</li>
     <li class="member">&quot;LC&quot; / &quot;Cased_Letter&quot;</li>
     <li class="member">&quot;M&quot; / &quot;Mark&quot;</li>
     <li class="member">&quot;N&quot; / &quot;Number&quot;</li>
     <li class="member">&quot;P&quot; / &quot;Punctuation&quot;</li>
     <li class="member">&quot;S&quot; / &quot;Symbol&quot;</li>
     <li class="member"> &quot;Z&quot; / &quot;Separator&quot;</li>
    </ul>
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlchar.getpropertyvalueenum-parameters">
  <h3 class="title">Parameters</h3>
  <dl>

   
    <dt>
<code class="parameter">property</code></dt>

    <dd>

     <p class="para">The Unicode property to lookup (see the <em>IntlChar::PROPERTY_*</em> constants).</p>
     <p class="para">
      If out of range, or this method doesn&#039;t work with the given value,
      <strong><code>IntlChar::PROPERTY_INVALID_CODE</code></strong> is returned.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">name</code></dt>

    <dd>

     <p class="para">
      The value name to be matched.  The name is compared using &quot;loose matching&quot; as described in PropertyValueAliases.txt.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlchar.getpropertyvalueenum-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the corresponding value integer, or <strong><code>IntlChar::PROPERTY_INVALID_CODE</code></strong> if the given name
   does not match any value of the given property, or if the property is invalid.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-intlchar.getpropertyvalueenum-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-3214">
   <p><strong>Example #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">getPropertyValueEnum</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_BLOCK</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'greek'</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">BLOCK_CODE_GREEK</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">getPropertyValueEnum</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_BIDI_CLASS</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'RIGHT_TO_LEFT'</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">CHAR_DIRECTION_RIGHT_TO_LEFT</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">getPropertyValueEnum</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_BIDI_CLASS</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'some&nbsp;made-up&nbsp;string'</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_INVALID_CODE</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">getPropertyValueEnum</span><span style="color: #007700">(</span><span style="color: #0000BB">123456789</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'RIGHT_TO_LEFT'</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">PROPERTY_INVALID_CODE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   <div class="example-contents"><p>The above example will output:</p></div>
   <div class="example-contents screen">
    <div class="cdata"><pre>
bool(true)
bool(true)
bool(true)
bool(true)
</pre></div>
   </div>
  </div>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="intlchar.getpropertyname.html">IntlChar::getPropertyName</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intlchar.getpropertyvaluename.html">IntlChar::getPropertyValueName</a></div>
 <div class="up"><a href="class.intlchar.html">IntlChar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>