On Thu, 2011-04-28 at 20:04 +0200, Ferenc Kovacs wrote: > > Why I need being "saved" from documenting my code properly? Anyway, the > > function code defines the behavior, declaration of return type just ensures > > function would fail in runtime if your code tries to return unexpected data > > - but how is it helpful? The client of this function doesn't even know that > > before actually calling it! > > > why did we added ppp if people can define in the documentation(or in the > method name :/) that which method is public and which isn't
with ppp i prevent the client code from doing something the function/class author didn't expect. With this return hint the function auther can force a runtime error when doing something wrong himself. (which he has to check one way or the other using tests etc.) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php