クラス内の関数で関数を呼び出すにはどうすればよいですか?
私のコードは次のようになります(例)
class Test
{
echo $this->unique();
public function unique($unique = FALSE)
{
function random()
{
return 1;
}
while($unique === FALSE)
{
return $this->random();
$unique = TRUE;
}
}
}
しかし、次のエラーが発生します: Call to undefined method Test::random()