# Classes in PHP

**URL:** <https://forum.kirupa.com/t/classes-in-php/199622>\
**Category:** Uncategorized\
**Created:** [September 4, 2006, 6:18pm UTC](https://forum.kirupa.com/t/classes-in-php/199622 "2006-09-04T18:18:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sliker\_Hawk](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Sliker\_Hawk](https://forum.kirupa.com/u/Sliker_Hawk)\
**Post date:** [September 4, 2006, 6:18pm UTC](https://forum.kirupa.com/t/classes-in-php/199622/1 "2006-09-04T18:18:08Z")

</div>

What is the point in them?  
People say it’s so you can use them on more than one page; why not just put the functions into a file and include the file?  
I’d rather not substitute:

```auto
include("fetching.php");
function();

```

For:

```auto
include("fetching.php");
$fetching = whatever-it-is;
$fetching->function();

```

Or even:

```auto
function Blahde() {
global $fetching;
$fetching->function();
[...]

```

Argh.  
Can anyone enlighten me?

Edit: And why have the code tags got that extra space under them?
