class pic
{
private $_url;
public function __get($name)
{
return $this->$name;
}
public function __set($name,$value)
{
return $this->$name = $value;
}
}
public function loadPic(pic $pic)
{
$this->_pic = $pic;
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
$pic= new pic;
$this->loadPic($pic);
loadPic(new pic)