On 12.10.2020 at 13:49, Hans Henrik Bergan wrote: > something like > > $result = (new HashContext("SHA1"))->update($str1)->update($str2)->final(); > > (userland sample imp: https://3v4l.org/lXd3u ) > > I tried asking on the bugtracker ( https://bugs.php.net/bug.php?id=80221 ) , > but was told to ask on this mailing list instead.
Thanks for bringing this up on the mailing list! I basically very much support a proper OOP interface, but I think the method names should use camel-case (e.g. ::updateFile() instead of ::update_file()), and it might be appropriate to rename ::final() to ::finalize(). More bikeshedding regarding the method names, and maybe their signatures might be in order. We do not necessarily have to make these methods aliases of the existing functions, although that's of course possible. -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php