Hi. I'm responsible for writing unit tests for our PHP projects at work.
I would find C++ style friend classes really useful for getting at another class's private methods. Since we adopted PHP5 we have been using lots of private methods to clean our interfaces up. Great news for everyone except me! I'd like to be able to do something like: class Coder { friend class CoderTest; private static function encode() { ... } } class CoderTest { $expected = ... $actual = Coder::encode(...); if( $expected != $actual ) ... } There is feature request on bugs.php.net (#34044) about this already, but no comments. Is there any support for this sort of thing out there? Useful addition to PHP6 maybe, or just another unnecessary feature? :-) Cheers, Leon -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php