回答編集履歴
1
edit
test
CHANGED
@@ -27,3 +27,47 @@
|
|
27
27
|
|
28
28
|
|
29
29
|
とりあえずifなしでそのままechoしてみればどう扱われているか分かると思います。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
要するにデバッグを。
|
34
|
+
|
35
|
+
```php
|
36
|
+
|
37
|
+
echo __LINE__."<br>";
|
38
|
+
|
39
|
+
foreach(['chicken','lemon','bread','water'] as $ing){
|
40
|
+
|
41
|
+
echo __LINE__."<br>";
|
42
|
+
|
43
|
+
if($soup->hasIngredient($ing)){
|
44
|
+
|
45
|
+
echo __LINE__."<br>";
|
46
|
+
|
47
|
+
print "Soup contains $ing.\n";
|
48
|
+
|
49
|
+
echo "<br>";
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
echo __LINE__."<br>";
|
54
|
+
|
55
|
+
if($sandwich->hasIngredient($ing)){
|
56
|
+
|
57
|
+
echo __LINE__."<br>";
|
58
|
+
|
59
|
+
print "Sandwich contains $ing.\n";
|
60
|
+
|
61
|
+
echo "<br>";
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
echo __LINE__."<br>";
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
```
|