21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
class page
{
public $A1;
public $A2;
function __construct($arg1,$arg2)
{
$this->$A1=$arg1;
$this->$A2=$arg2;
}
function show()
{
var_dump($this->$A1);
echo "<hr/>";
var_dump($this->$A2);
echo "<hr/>";
}
}
$pag=new page("This is Arg1",1000);
$pag->show();
/*
output:
int(1000)
____________________
int(1000
*/
?>