Re: svn: /phpdoc/en/trunk/language/oop5/ basic.xml

From: Date: Fri, 15 Jan 2016 14:03:41 +0000
Subject: Re: svn: /phpdoc/en/trunk/language/oop5/ basic.xml
References: 1  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13986@lists.php.net to get a copy of this message
On 15 January 2016 at 13:31, Christoph Michael Becker <cmb@php.net> wrote: > cmb Fri, 15 Jan 2016 13:31:35 +0000 > > Revision: > http://svn.php.net/viewvc?view=revision&revision=338498 > > Log: > ::class is a compile time transformation > > Changed paths: > U phpdoc/en/trunk/language/oop5/basic.xml > > Modified: phpdoc/en/trunk/language/oop5/basic.xml > =================================================================== > --- phpdoc/en/trunk/language/oop5/basic.xml 2016-01-15 13:24:06 UTC > (rev 338497) > +++ phpdoc/en/trunk/language/oop5/basic.xml 2016-01-15 13:31:35 UTC > (rev 338498) > @@ -380,6 +380,14 @@ > </screen> > </example> > </para> > + <note> > + <para>The class name resolution using <literal>::class</literal> is a > + compile time transformation. That means at the time the class name > string > + is created no autoloading has happened yet. As a consequence, class > names > + are expanded even if the class does not exist. No error is issued in > + that case. > + </para> > + </note> > I don't think we need to justify why the autoloader isn't called here. A sentence saying that the autoloader is not called would be sufficient in my eyes. Also, if you want to keep the justification description, note that "::class" is not compile-time only, it can also be used for runtime lookups such as "static::class". > </sect2> > </sect1> > > > > -- > PHP Documentation Commits Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.doc.cvs (#13986) next »