strtolower()
文字列にしようとすると、次のエラーが表示されます。
Warning: strtolower() expects parameter 1 to be string, object given in
を実行するvar_dump()
と、文字列は文字列である必要があることがわかりますか?
string(21) "This IS a Test String"
いくつかのコード:
protected $hostname;
public function __construct($hostname)
{
//$this->hostname = $hostname;
$this->hostname = 'This IS a TeSt String';
return $this->_filter();
}
private function _filter()
{
$hostname = $this->hostname;
var_dump($hostname);
$hostname = strtolower($hostname);
$hostname = $this->_getDomain($hostname);
$hostname = $this->_stripDomain($hostname);
return $hostname;
}
前もって感謝します!