开发者

output constructor variable value in oop php

My concept is very poor in o开发者_StackOverflow中文版op for php. My class has a constructor with three parameters.i create a object and pass three values to the constructor. Now, how will i show constructor value.


class Foo {

public function __constructor($para1, $para2, $para3 ){

   echo $para1 . '<br>';
   echo $para2 . '<br>';
   echo $para3 . '<br>';
}

}

$f = Foo(10,20,30);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜