这是三元表达式
$first ? $second : $third
如果第一个子表达式的值是 TRUE(非零),那么计算第二个子表达式的值,其值即为整个表达式的值。否则,将是第三个子表达式的值。
如果 array_key_exists($name,$this->p) 为true 则返回$this->p[$name]的值,否则返回null。
$first ? $second : $third
如果第一个子表达式的值是 TRUE(非零),那么计算第二个子表达式的值,其值即为整个表达式的值。否则,将是第三个子表达式的值。
如果 array_key_exists($name,$this->p) 为true 则返回$this->p[$name]的值,否则返回null。
if(array_key_exists($name,$this->p))
{
return $this->p[$name];
}
else
{
return null;
}
?=if
:=else
if(array_key_exists($name,$this->p))
{
return $this->p[$name];
}
else
{
return null;
}
?=if
:=else