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:
Adam Harvey 2013-06-20 23:39:39 +00:00
parent f878df475d
commit 08634347f4

View file

@ -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>