回答編集履歴
1
stdinの例を追加
answer
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
```php
|
2
2
|
list($a, $b) = explode(" ", "hello world");
|
3
3
|
```
|
4
|
-
で $a に hello、$b に world が代入されます。
|
4
|
+
で $a に hello、$b に world が代入されます。
|
5
|
+
|
6
|
+
stdin から読むのであれば
|
7
|
+
|
8
|
+
```php
|
9
|
+
list($a, $b) = explode("\n", stream_get_contents(STDIN));
|
10
|
+
```
|
11
|
+
|
12
|
+
ですかね。
|