回答編集履歴

1

引用部分を修正

2017/06/09 11:28

投稿

momon-ga
momon-ga

スコア4820

test CHANGED
@@ -3,6 +3,14 @@
3
3
 
4
4
 
5
5
  ```PHP
6
+
7
+ $obj->func = function(){
8
+
9
+ echo "hello";
10
+
11
+ };
12
+
13
+
6
14
 
7
15
  //$obj->func(); // doesn't work! php tries to match an instance method called "func" that is not defined in the original class' signature
8
16