class GetInfo {
public $name;
function __construct($name) {
$this->name = $name;
$name = strtoupper($name);
return $name;
}
}
$a = new GetInfo('Ivan');
...
class GetInfo
{
public $name;
function __construct($name)
{
$this->name = strtoupper($name);
}
function __toString()
{
return $this->name;
}
}
$a = new GetInfo('Ivan');
// ...
void __construct ([ mixed $args = "" [, $... ]] )