Codice PHP:
class persona 
   

       private 
$name

       public function 
__construct($n
       { 
           
$this->name $n
       } 
        
       public function 
getname() 
       { 
        return 
$this->name
        } 
   } 
   
   
$nickname 'Vincent';
   
$utente =  new persona($nickname);
   
   print(
"il nome dell'utente è: [b]" $utente->getname() ."[/b]

"
); 
A me funziona tutto correttamente , forse hai sbagliato qualcos'altro