回答編集履歴

1

2015/02/12 03:21

投稿

yamaguchi79
yamaguchi79

スコア87

test CHANGED
@@ -1,18 +1,16 @@
1
1
  constant()関数を使った下記のコードを試してみてください。
2
2
 
3
3
 
4
-
5
- ```lang-<ここに言語を入力>
6
4
 
7
5
  class Sample
8
6
 
9
7
  {
10
8
 
11
- const TestValue = 1;
9
+ const TestValue = 1;
12
10
 
13
- const AnotherTestValue = 2;
11
+ const AnotherTestValue = 2;
14
12
 
15
-
13
+
16
14
 
17
15
  }
18
16
 
@@ -22,10 +20,8 @@
22
20
 
23
21
  $id = constant("Sample::$val");
24
22
 
25
- ```
26
-
27
23
 
28
24
 
29
25
  constant()関数の詳しい内容をPHPマニュアルを参照して下さい。
30
26
 
31
- [http://www.php.net/manual/ja/function.constant.php](http://www.php.net/manual/ja/function.constant.php)
27
+ http://www.php.net/manual/ja/function.constant.php