svn: /phpdoc/pt_BR/trunk/language/oop5/ basic.xml

From: Date: Wed, 26 Jun 2013 16:10:27 +0000
Subject: svn: /phpdoc/pt_BR/trunk/language/oop5/ basic.xml
Groups: php.doc.pt-br 
Request: Send a blank email to doc-pt-br+get-4228@lists.php.net to get a copy of this message
bjori Wed, 26 Jun 2013 16:10:27 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=330674 Log: Fix build (still needs to be translated) Changed paths: U phpdoc/pt_BR/trunk/language/oop5/basic.xml Modified: phpdoc/pt_BR/trunk/language/oop5/basic.xml =================================================================== --- phpdoc/pt_BR/trunk/language/oop5/basic.xml 2013-06-26 15:21:24 UTC (rev 330673) +++ phpdoc/pt_BR/trunk/language/oop5/basic.xml 2013-06-26 16:10:27 UTC (rev 330674) @@ -256,7 +256,41 @@ </screen> </example> </sect2> + <sect2 xml:id="language.oop5.basic.class.class"> + <title>::class</title> + <para> + Since PHP 5.5, the <literal>class</literal> keyword is also used for class + name resolution. You can get a string containing the fully qualified name + of the <literal>ClassName</literal> class by using + <literal>ClassName::class</literal>. This is particularly useful with + <link linkend="language.namespaces">namespaced</link> classes. + </para> + <para> + <example xml:id="language.oop5.basic.class.class.name"> + <title>Class name resolution</title> + <programlisting role="php"> +<![CDATA[ +<?php +namespace NS { + class ClassName { + } + + echo ClassName::class; +} +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +NS\ClassName +]]> + </screen> + </example> + </para> + </sect2> + </sect1> <!-- Keep this comment at the end of the file

« previous php.doc.pt-br (#4228) next »