質問編集履歴
2
サンプルコード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,11 +10,9 @@
|
|
10
10
|
|
11
11
|
{
|
12
12
|
|
13
|
-
echo
|
13
|
+
echo(static::$myvar . $param);
|
14
14
|
|
15
15
|
}
|
16
|
-
|
17
|
-
$instance = new NewClass();
|
18
16
|
|
19
17
|
}
|
20
18
|
|
@@ -24,7 +22,9 @@
|
|
24
22
|
|
25
23
|
```PHP
|
26
24
|
|
27
|
-
class MySecondClass
|
25
|
+
class MySecondClass
|
26
|
+
|
27
|
+
{
|
28
28
|
|
29
29
|
private static function myfunc2()
|
30
30
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
$firstclass = new MyFirstClass;
|
34
34
|
|
35
|
-
$firstclass->myfunc('bar')
|
35
|
+
$firstclass->myfunc('bar');
|
36
36
|
|
37
37
|
}
|
38
38
|
|
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
{
|
52
52
|
|
53
|
-
MyFirstClass::myfunc('bar')
|
53
|
+
MyFirstClass::myfunc('bar');
|
54
54
|
|
55
55
|
}
|
56
56
|
|
1
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
class MyFirstClass {
|
6
6
|
|
7
|
-
p
|
7
|
+
private static $myvar = 'foo';
|
8
8
|
|
9
9
|
public static function myfunc($param)
|
10
10
|
|