Re: Design by Contract
| From: | Dmitry Stogov | Date: | Tue, 10 Feb 2015 09:48:32 +0000 |
| Subject: | Re: Design by Contract | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82356@lists.php.net to get a copy of this message | ||
I think __RETURN__ is better than $ret.
Dmitry.
On Tue, Feb 10, 2015 at 12:43 PM, Patrick Schaaf <php@bof.de> wrote:
> Am 10.02.2015 09:29 schrieb "Dmitry Stogov" <dmitry@zend.com>:
> >
> > I cnahged $> into $ret, because $> just won't work. Some better solution
> is welcome.
>
> Also think $> would be awful. Don't like $ret either. What about a magic
> constant __RETURN__ or __RESULT__? This would stand out very well when
> glancing at the expression, would fit in with naming of other magic
> constants, and might even be made to work in finally blocks, where the same
> need for access to the returned value exists.
>
> best regards
> Patrick
>