mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix #76117: uopz flags is NOT for classes, but methods
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350311 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
418de44708
commit
7cd4445be9
1 changed files with 25 additions and 1 deletions
|
@ -41,7 +41,9 @@
|
|||
<term><parameter>function</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the function
|
||||
The name of the function. If <parameter>class</parameter> is given and an empty string
|
||||
is passed as <parameter>function</parameter>, <function>uopz_flags</function>
|
||||
gets or sets the flags of the class entry.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -121,6 +123,28 @@ bool(false)
|
|||
int(1234567890)
|
||||
bool(true)
|
||||
bool(true)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>"Unfinalize" a Class</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
final class MyClass
|
||||
{
|
||||
}
|
||||
|
||||
$flags = uopz_flags(MyClass::class, '');
|
||||
uopz_flags(MyClass::class, '', $flags & ~ZEND_ACC_FINAL);
|
||||
var_dump((new ReflectionClass(MyClass::class)->isFinal());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue