<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionproperty.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'reflectionproperty.getrawvalue.php',
    1 => 'ReflectionProperty::getRawValue',
    2 => 'Returns the value of a property, bypassing a get hook if defined',
  ),
  'up' => 
  array (
    0 => 'class.reflectionproperty.php',
    1 => 'ReflectionProperty',
  ),
  'prev' => 
  array (
    0 => 'reflectionproperty.getname.php',
    1 => 'ReflectionProperty::getName',
  ),
  'next' => 
  array (
    0 => 'reflectionproperty.getsettabletype.php',
    1 => 'ReflectionProperty::getSettableType',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionproperty/getrawvalue.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionproperty.getrawvalue" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionProperty::getRawValue</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">ReflectionProperty::getRawValue</span> &mdash; <span class="dc-title">Returns the value of a property, bypassing a get hook if defined</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionproperty.getrawvalue-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionProperty::getRawValue</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.object.php" class="type object">object</a></span> <code class="parameter">$object</code></span>): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is
currently not documented; only its argument list is available.
</p></div>
  <p class="simpara">
   Returns the value of a property, bypassing a <code class="literal">get</code> hook if defined.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionproperty.getrawvalue-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">object</code></dt>
    <dd>
     <span class="simpara">
      The object from which to retrieve a value.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionproperty.getrawvalue-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   The stored value of the property, bypassing a <code class="literal">get</code> hook if defined.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionproperty.getrawvalue-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="simpara">
   If the property is virtual, an <span class="classname"><a href="class.error.php" class="classname">Error</a></span> will be thrown,
   as there is no raw value to retrieve.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionproperty.getrawvalue-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="reflectionproperty.getrawvalue.example.basic">
   <p><strong>Example #1 <span class="methodname"><strong>ReflectionProperty::getRawValue()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Example<br /></span><span style="color: #007700">{<br />    public </span><span style="color: #0000BB">string $tag </span><span style="color: #007700">{<br />        </span><span style="color: #0000BB">get </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tag</span><span style="color: #007700">);<br />    }<br />}<br /><br /></span><span style="color: #0000BB">$example </span><span style="color: #007700">= new </span><span style="color: #0000BB">Example</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$example</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tag </span><span style="color: #007700">= </span><span style="color: #DD0000">'PHP'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$rClass </span><span style="color: #007700">= new </span><span style="color: #0000BB">\ReflectionClass</span><span style="color: #007700">(</span><span style="color: #0000BB">Example</span><span style="color: #007700">::class);<br /></span><span style="color: #0000BB">$rProp </span><span style="color: #007700">= </span><span style="color: #0000BB">$rClass</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getProperty</span><span style="color: #007700">(</span><span style="color: #DD0000">'tag'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// These would go through the get hook, so would produce "php"<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$example</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tag</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">$rProp</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getValue</span><span style="color: #007700">(</span><span style="color: #0000BB">$example</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// But this would bypass the hook and produce "PHP"<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$rProp</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRawValue</span><span style="color: #007700">(</span><span style="color: #0000BB">$example</span><span style="color: #007700">);<br /><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="annotation-interactive examplescode"><pre class="examplescode">php
php
PHP</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionproperty.getrawvalue-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><a href="language.oop5.visibility.php#language.oop5.visibility-members-aviz" class="link">Asymmetric property visibility</a></li>
  </ul>
 </div>


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