Req #77776 [Dup]: if inline goto
| From: | requinix@php.net | Date: | Thu, 21 Mar 2019 23:39:34 +0000 |
| Subject: | Req #77776 [Dup]: if inline goto | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220119@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77776&edit=1
ID: 77776
Updated by: requinix@php.net
Reported by: xxalfa at gmail dot com
Summary: if inline goto
Status: Duplicate
Type: Feature/Change Request
Package: *General Issues
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
If there is no matching label then PHP will die. goto will never return.
Previous Comments:
------------------------------------------------------------------------
[2019-03-21 23:34:40] xxalfa at gmail dot com
We are not talking about the same thing yet. The difference is well known to me, I ask more the
question, why is "goto" can not be an expression. What would have to be done for
"goto" to say the other side is there (or not), I'll jump (or not). I imagine a
milder "goto" feature, which asks politely, can I jump? The current "goto"
function absolutely wants to have a counterpart.
------------------------------------------------------------------------
[2019-03-21 22:38:12] requinix@php.net
If you want to continue the RFC process on your other request, read the How To you were linked that
tells you exactly what you need to do.
If you need an explanation of the difference between a statement and an expression, try
StackOverflow.
------------------------------------------------------------------------
[2019-03-21 22:35:10] requinix@php.net
Duplicate of request #72589.
------------------------------------------------------------------------
[2019-03-21 06:07:26] xxalfa at gmail dot com
That's right, with "foreach" and "return" it makes no sense.
"require_once" returns a 0 or 1. Why does not "goto" do the same? Can I jump =
1, I can not jump = 0.
------------------------------------------------------------------------
[2019-03-21 03:18:46] requinix@php.net
For the same reason you can't do it with a foreach or return: they are statements, not
expressions.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77776
--
Edit this bug report at https://bugs.php.net/bug.php?id=77776&edit=1