mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Expand the ::class section in the new features list.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330579 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f878df475d
commit
08634347f4
1 changed files with 21 additions and 4 deletions
|
@ -399,13 +399,30 @@ String dereferencing: P
|
|||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration55.new-features.class-name">
|
||||
<title>Class name resolution</title>
|
||||
<title>Class name resolution via <link linkend="language.oop5.basic.class.class">::class</link></title>
|
||||
|
||||
<para>
|
||||
It is possible to use <literal>ClassName::class</literal> to get a fully
|
||||
qualified name of class <literal>ClassName</literal>. See
|
||||
<link linkend="language.oop5.basic.class.class">::class</link> for more
|
||||
details.
|
||||
qualified name of class <literal>ClassName</literal>. For example:
|
||||
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
namespace Name\Space;
|
||||
class ClassName {}
|
||||
|
||||
echo ClassName::class;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Name\Space\ClassName
|
||||
]]>
|
||||
</screen>
|
||||
</informalexample>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
|
|
Loading…
Reference in a new issue