Re: RFC: Traits for PHP

From: Date: Wed, 20 Feb 2008 09:07:37 +0000
Subject: Re: RFC: Traits for PHP
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-35645@lists.php.net to get a copy of this message
On Mon, 18 Feb 2008, Richard Lynch wrote: > On Mon, February 18, 2008 1:27 pm, php@stefan-marr.de wrote: > > <?php > > trait ezcReflectionReturnInfo { > > function getReturnType() { /*1*/ } > > function getReturnDescription() { /*2*/ } > > } > > > > class ezcReflectionMethod extends ReflectionMethod { > > use ezcReflectionReturnInfo; > > So it's just like an include for a re-used body of 'class' code. > > Hmmmm. > > Why not just allow 'include' here instead? Because include happens during runtime, not compile time. regards, Derick

« previous php.internals (#35645) next »