Am 19.06.2017 um 16:24 schrieb Ivan Enderlin:
Thank you for the RFC. I have a question though. I would like to know how is it different from the `goto` language construction?

If I understand it correctly, both the following examples are identical:

    try {

         // …

    } catch (…) {

         retry;

    }

and:

    try {

    retry:

         // …

    } catch (…) {

         goto retry;

    }

even if both works the retry-statement is much clearer, especially when the code becomes larger than these few lines

Also, what happens if the `try` block keeps failing over and over again: This is a non-breakable loop.

well, as for other loops you are responsible at your own to count up a $retry_count and stop after N tries

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

Reply via email to