The original code actually can be found inside php_cli.c and there it
only checked the 1st line for '#'. if you create a file such as:
#1
#2
The issue here is that the old code only looked at the main script, now
included files ar affected, too.
So either we check in the scanner whether this is
trait Counter {
var $value;
public function inc() { $this->value++; }
...
}
trait Color {
var $hue;
var $saturation;
var $value;
public function getRGB() { /* ... */}
...
}
class MyClass {
use Counter, Color;
}
Ok, you could argue that you than will have to refactor your prope
Hi Stan,
I see this in a much simpler fashion. Treat traits as a preprocessor
step semantically.
Internally, trait methods on multiple classes may point to the same
method to save resources, but in my opinion there's no need to
complicate matter by introducing new resolution rules, scopes
The question here is how to handle property accesses, in particular
accesses to unspecified properties.
I actually would expect to have a lookup mechanism which first looks in
the trait, and if the property is not found there, its going to the
object. I expect this behavior, because it is simil
adding more .phpt to the repo
Pierre asked me to fill this one out after testfest munich
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php