回答編集履歴

2

修正

2017/05/31 08:53

投稿

退会済みユーザー
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  ];
14
14
 
15
- $test='';
15
+ $test='';
16
16
 
17
17
  if (!isset($switch[$test])) {
18
18
 

1

条件修正

2017/05/31 08:53

投稿

退会済みユーザー
test CHANGED
@@ -1,6 +1,8 @@
1
1
  じゃ、こっちでw
2
2
 
3
3
  ```php
4
+
5
+ <?php
4
6
 
5
7
  $switch = [
6
8
 
@@ -10,6 +12,12 @@
10
12
 
11
13
  ];
12
14
 
15
+ $test='';
16
+
13
- if (isset($switch[$test])) {}
17
+ if (!isset($switch[$test])) {
18
+
19
+ throw new Exception('どちらでもない');
20
+
21
+ }
14
22
 
15
23
  ```