Stefan Marr wrote:
Hi Stanislav,

traits the included trait is using). Ok this is the scope. Now we
would need to adjust all those method bodies, find all method calls on
$this->oldMethodName() and change them to $this->newMethodName().
You can't - PHP has dynamic method resolution (think $this->$foo()).
Also, it has callbacks - what happens if method is registered as
callback is renamed?
thanks, this is very good reason not to allow renaming, but aliasing.
:)

Aliasing doesn't make a lot of sense, as you can always :

function newMethod() {

  return $this->oldMethod();

}

just seems like unneeded complexity, without a clear benefit..

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to