# \[PHP\] OOP help!

**URL:** <https://forum.kirupa.com/t/php-oop-help/186364>\
**Category:** programming\
**Created:** [April 20, 2006, 7:45pm UTC](https://forum.kirupa.com/t/php-oop-help/186364 "2006-04-20T19:45:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chunk](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@chunk](https://forum.kirupa.com/u/chunk)\
**Post date:** [April 20, 2006, 7:45pm UTC](https://forum.kirupa.com/t/php-oop-help/186364/1 "2006-04-20T19:45:12Z")

</div>

Hello… I seem to be having some trouble on the basics of OOP in PHP, and for the life of me can’t get this to work:

c.php

```php
<?PHP
    class repeat {
        function repeattwice($repeat) {
            echo $repeat;
            echo $repeat;
        }
    }
?>

```

runme.php

```php
<?PHP

    include("c.php");
    $crepeat = new repeat;

    $crepeat->repeattwice("HELLO!");
    
?>

```

I don’t really see the problem with this… help is really welcomed here 😑

---

<div class="post-metadata">

**Author:** ![rufusW](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@rufusW](https://forum.kirupa.com/u/rufusW)\
**Post date:** [April 20, 2006, 8:58pm UTC](https://forum.kirupa.com/t/php-oop-help/186364/2 "2006-04-20T20:58:14Z")

</div>

Hi chunk

You need to include parentheses when you create an object

```php
 $crepeat = new repeat();

```
