gpt4 book ai didi

php - 冒号是什么意思(:) operator after member function name in php

转载 作者:可可西里 更新时间:2023-11-01 00:54:47 27 4
gpt4 key购买 nike

<分区>

我想知道方法名称后冒号的含义,即

public function getTitle():Data {

interface Data { 
public function details(string $name);
}
class Company {
private $title;

public function getTitle():Data {
return $this->title;
}

public function setTitle(Data $title)
{
$this->title=$title
}

}

.....
.....

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com