Le 23/09/2013 10:39, Rasmus Lerdorf a écrit :
On 09/22/2013 11:39 PM, Joe Watkins wrote:
     https://wiki.php.net/rfc/anonymous_classes

     I'd like to hear thoughts regarding the addition of anonymous
classes, patch included.

I am having a hard time picturing a real-world use-case for this.

Adding to the other use-cases already explained: it would also definitely be very useful for mocking in tests. We could create on-the-fly implementations for interfaces, avoiding using complex mocking API (PHPUnit or others).

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

Reply via email to