Question: I have a class look like below:

```
<?php 
class theGodFather {
    public function do() {
        echo "the movie is nice";
    }
}

$obj = new theGodFather;
echo $theGodFather->do;

```

When run I got the error: syntax error, unexpected T\_DO, expecting T\_STRING in /Applications/XAMPP/xamppfiles/htdocs/test/classes.php on line 3

what could I possibly did wrong?

Answer: 
You cannot use [*keywords*](http://php.net/manual/en/reserved.keywords.php) as names for functions/classes/methods and constants, `do` is one. You can use them as variable names, however.
"do" is a keyword (can be used in a do while loop). Also you're echoing a function that returns nothing, but echoes something in it.

Rename the "do" function to "echoFunction" or whatever name you choose and then
change this:

```
$obj = new theGodFather;
echo $theGodFather->do;

```

to:

```
$obj = new theGodFather;
$obj->echoFunction();

```

The reason you wouldn't call $theGodFather->echoFunction because theGodFather is a class definition, while $obj is an actual instance of the class. You can have static methods in PHP that you can call without creating a new instance.