class TextBox {
   var $body_text = "mj tekst";
   // funkcja konstruktora
   function __construct($text_in) {
      $this->body_text = $text_in;
   }
   function display() {
      print("<TABLE BORDER=1><TR><TD>$this->body_text");
      print("</TD></TR></TABLE>");
   }
}
// tworzenie egzemplarza
$box = new TextBox("wasny tekst");
$box->display();
