name = $productname; $this->price = $price; } function get_name() { return $this->name; } function get_price() { return $this->price; } } $p1 = new product("Computer", "10000"); echo $p1->get_name(); echo $p1->get_price(); ?>