Class: get like :set like : it's PHP way

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Class Read Write like Properties</title>
</head>
<body text="#000080" bgcolor="#F0FAFF">
<?php
class player
{
var $name;
function write_name($text)
{
$this->name = $text;
}
function print_name()
{
return $this->name;
}
}

$p = new player;
$p->write_name("Manas");
echo "New player is ", $p->print_name() ;

?>
</body>
</html>