Get error messages when I have a syntax error?
<p>I have a class and the commented line is failing (clearly because I don't need the <code>$</code> before <code>displayname</code>), however I ended up having to put a bunch of <code>echo</code> statements in to figure that out because an error isn't being thrown.</p>

<p>I'm hoping there is a way.</p>

<pre><code>class RegisterModel {
    var $displayname;
    ...
    function RegisterModel() {
        try {
            if (empty($_POST) === false) {
                // THIS LINE IS FAILING ... BUT I'M NOT GETTING AN ERROR
                // I KNOW WHY IT'S FAILING ... BUT I WANT AN ERROR TO THROW
                $this-&gt;$displayname = $_POST['displayname'];
                ...
            }
        }
        catch (Exception $e) {
            echo $e-&gt;getMessage();
        }
    }
}
</code></pre>

<p>Should the error be getting thrown into the <code>catch</code> and I'm just not using it right? Is there some global setting I need to set so that the errors are thrown?</p>
