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 have use do function in class "do" is a keyword of php and you cannot use keyword in function or class

try this

```
class theGodFather 
{
    // property declaration
    public $var = 'a default value';

    // method declaration
    public function displayVar() {
        echo 'a default value';
    }
}

$obj = new theGodFather();

//print_r($obj);
echo $obj->displayVar();

```
`do` is a keyword, therefore the interpreter gets very very confused. :(
Choose a different function name and it works!