<?php
 class Punkt{
   var $x=3;
   var $y=5;  
 }
 $p=new Punkt;
 $element="x";
 echo $p->$element;
?>