[請益] return from a function
PHP 官方文件裡提到可以 Returning a reference from a function
(出處: http://www.php.net/manual/en/functions.returning-values.php)
官方範例:
<?php
function &returns_reference()
{
return $someref;
}
$newref =& returns_reference();
?>
我想請問一下,在同一個程式裡,可以再定義另一個這樣的 function 嗎?
差別在少了 function name 前面的「&」。
<?php
function returns_reference()
{
return $someref;
}
?>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.84.124.162
→
09/18 21:08, , 1F
09/18 21:08, 1F
→
09/19 10:58, , 2F
09/19 10:58, 2F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章