看板 PHP 關於我們 聯絡資訊
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
aquarianboy :其實直接試一下應該就知道囉 :) 09/18 21:08
s5846125 :嗯,試出來了: Fatal error: Cannot redeclare 09/19 10:58