回答編集履歴
2
間違い修正
answer
CHANGED
@@ -5,9 +5,10 @@
|
|
5
5
|
return (を含む構文要素)は明確に「文(statement)」です。
|
6
6
|
[https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L436](https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L436)
|
7
7
|
|
8
|
-
しかし exit() は「式(expression)」
|
8
|
+
しかし exit() は「式(expression)」を受け取る何かであって文ではないです。
|
9
9
|
[https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L972](https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L436)
|
10
10
|
|
11
11
|
このことから「exit文」と書くと嘘になってしまいます。
|
12
|
-
かといって「exit式」だとか「exitを含む式文」だとかでは逆に紛らわしいというか**誰も言わない**表現なのでしょう。
|
13
|
-
苦しくても、けれども嘘は書きたくなくて「exit構文」と書いたのではないでしょうか。
|
12
|
+
苦しくても、けれども嘘は書きたくなくて「exit構文」と書いたのではないでしょうか。
|
13
|
+
|
14
|
+
※すみません。間違っていたので直しました。あとmattnさんが詳しく書かれていました。
|
1
英単語追加
answer
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
returnもexitもPHPの構文規則の中で決められている語ではあります。
|
4
4
|
|
5
|
-
return (を含む構文要素)は明確に「文」です。
|
5
|
+
return (を含む構文要素)は明確に「文(statement)」です。
|
6
6
|
[https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L436](https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L436)
|
7
7
|
|
8
|
-
しかし exit() は「式」になっています。
|
8
|
+
しかし exit() は「式(expression)」になっています。
|
9
9
|
[https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L972](https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L436)
|
10
10
|
|
11
11
|
このことから「exit文」と書くと嘘になってしまいます。
|