title: Require Once stops script
body: <p>I have a php script, test.php that has the contents</p>
  
  <pre><code>&lt;?php
       require_once("classes/user.php");
       echo "test";
  ?&gt;
  </code></pre>
  
  <p>and here is the contents of user.php</p>
  
  <pre><code>&lt;?php 
  class User {
      private $data = array();
  
      public function __set($name, $value) {
          $this-&gt;data[$name] = $value;
      }
  
      public function __get($name) {
          if (array_key_exists($name, $this-&gt;data)) {
              return $this-&gt;data[$name];
          }
  
          $trace = debug_backtrace();
          trigger_error(
              'Undefined property via __get(): ' . $name .
              ' in ' . $trace[0]['file'] .
              ' on line ' . $trace[0]['line'],
              E_USER_NOTICE);
          return null;
      }
  
      public function __isset($name) {
          return isset($this-&gt;data[$name]);
      }
  
      public function __unset($name) {
          unset($this-&gt;data[$name]);
      }
  
      public __construct($param) {
          if(is_array($param)) $this-&gt;create($param);
          else $this-&gt;id($param);
      }
  
      private id($id) { //select from database
          require_once('config.php');
  
          $pdo = new PDOConfig();
  
          $sql = "SELECT * FROM users WHERE `id` = :id";
  
          $q = $pdo-&gt;prepare($sql);
          $q-&gt;execute(array(":id"=&gt;$id));
          $resp = $q-&gt;fetchAll();
  
          foreach ($resp as $row) {
              foreach ($row as $key=&gt;$value) {
                  if(!is_int($key))
                      $this-&gt;data[$key] = html_entity_decode($value, ENT_QUOTES);
              }
          }
  
          $pdo = null;
          unset($pdo);
      }
  
      private create($arr) { //create new item from values in array and insert to db
  
      }
  
      public delete() {
          $this-&gt;life = 0;
          //update database "life" here
      }   
  
      /* ##################################### */
      /* !Functions                            */
      /* ##################################### */
  
      public projects($extra = null) {
          $projects = array();
          require_once('project.php');
  
          $pdo = new PDOConfig();
  
          $sql = "SELECT * FROM ---- WHERE `000` = :aaa";
  
          if($extra) $sql .= " " . $extra;
  
          $q = $pdo-&gt;prepare($sql);
          $q-&gt;execute(array(":aaa"=&gt;$this-&gt;id));
          $resp = $q-&gt;fetchAll();
  
          foreach ($resp as $row) {
                  $project = new Project($row['id']);
                  $projects[] = $project;
  
                  $project = null;
                  unset($project);
          }
  
          return $projects;
      }
  
  }
  ?&gt;
  </code></pre>
  
  <p>and test is never printed, and on chrome the page doesn't load at all </p>
  
  <blockquote>
    <p>The website encountered an error while retrieving <a href="http://example.com/test.php" rel="nofollow">http://example.com/test.php</a>. It may be down for maintenance or configured incorrectly.</p>
  </blockquote>
  
  <p>I can't figure this out for the life of me. Thanks it advance</p>