<?php
class Cl
{
 private $va;
 function getVa(){
 return $this->va;
 }
 function setVa($a){
 $this->va = $a;
 }
}
$A = new Cl();
$A->setVa(1000);
print $A->getVa();
?>
へえ〜〜 便利になっているなぁ
<?php
class Cl
{
 private $va;
 function getVa(){
 return $this->va;
 }
 function setVa($a){
 $this->va = $a;
 }
}
$A = new Cl();
$B = new Cl();
$A->setVa("this is A");
$B->setVa("this is B");
print $A->getVa() ."\n";
print $B->getVa() ."\n";
$B = $A;
$B->setVa("this is UMA");
print $A->getVa() ."\n";
print $B->getVa() ."\n";
?>
お〜〜 参照渡しになっている
テレワークならECナビ Yahoo 楽天 LINEがデータ消費ゼロで月額500円〜!
無料ホームページ 無料のクレジットカード 海外格安航空券 海外旅行保険が無料! 海外ホテル