Include, getting "PHP Parse error: syntax error, unexpected 'private' (T_PRIVATE)"
<p>Hi guys haven done stuff on PHP for quite a while, but I was trying to get an coreDB.php file to have DB information and to be open and close from this file.</p>

<p>Everything is working, but when I try to include this on another file, I allways get the error that I put on the title.</p>

<p>coreDB file:</p>

<pre><code>&lt;?php
ini_set('display_errors',1); 
error_reporting(E_ALL);

class ConnectionDB
{

    private $dbhost = "localhost";
    private $dbuser = "user";
    private $dbpass = "password";
    private $dbname = "dbname";
    public $conn;

    public function openDbConnection()
    {
        try
        {   
            $this-&gt;conn = new PDO("mysql:host=$this-&gt;dbhost;dbname=$this-&gt;dbname", $this-&gt;dbuser, $this-&gt;dbpass);
            echo "Connection Done&lt;br&gt;";
        }
        catch(PDOException $e)
        {
            //var_dump($this-&gt;conn);
            //echo $e-&gt;getMessage();
        }
    }

    public function closeDbConnection()
    {
        try
        {
            $this-&gt;conn = NULL;
            echo "Connection Over";
        }
        catch(PDOException $e)
        {
            //var_dump($this-&gt;conn);
            //echo $e-&gt;getMessage();
        }
    }
}?&gt;
</code></pre>

<p>The other file, clientNewRecord.php, where the previous is include:</p>

<pre><code>&lt;?php
ini_set('display_errors',1); 
error_reporting(E_ALL);
include("coreDB.php");

echo "this is a test";

private $dbConnect = new ConnectionDB();

$this-&gt;dbConnect-&gt;openDbConnection();
$this-&gt;dbConnect-&gt;closeDbConnection();?&gt;
</code></pre>

<p>I allways get this error: PHP Parse error:  syntax error, unexpected 'private' when trying to open the clientNewRecord.php</p>

<p>Isn't when I try to run the $this->dbConnect->openDbConnection(), to go into that file and run from that file?</p>