Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_3) / zend_language_scanner.c zend_language_scanner.l

2009-04-18 Thread Nuno Lopes
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

Re: [PHP-DEV] Grafts, Traits, horizontal reuse

2009-04-18 Thread Stan Vassilev | FM
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

Re: [PHP-DEV] Grafts, Traits, horizontal reuse

2009-04-18 Thread Stefan Marr
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

Re: [PHP-DEV] Grafts, Traits, horizontal reuse

2009-04-18 Thread Stan Vassilev | FM
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

[PHP-DEV] CVS Account Request: sebs

2009-04-18 Thread Sebastian Schürmann
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