# Classes

**URL:** https://forum.kirupa.com/t/classes/250548
**Category:** Uncategorized
**Created:** [January 30, 2008, 1:19pm UTC](https://forum.kirupa.com/t/classes/250548 "2008-01-30T13:19:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mattop](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mattop](https://forum.kirupa.com/u/mattop)
#### Post date: [January 30, 2008, 1:19pm UTC](https://forum.kirupa.com/t/classes/250548/1 "2008-01-30T13:19:40Z")

</div>

Can someone explain PHP classes to me. I don’t understand how they work. I know that you need to create a class and method inside of them, but I don’t know how to access them and use them. Here is a sample of what I know:

```auto

<?php
  class reg {
    public $test = "hello world";
    public function add() {
    }
    public function remove() {
    }
  }
?>

```
