title: Php Error - Unexpected require_once expecting function
body: <p>I'm currently trying to fetch the medoo framework so that I can begin easily retrieving data from my MySQL database... and for some reason it doesn't work!</p>
  
  <p>here's the code of my <strong>signin.php</strong> file</p>
  
  <pre><code>&lt;?php
      function loginUserAccount($loginname, $password){
      // Include Medoo (configured)
      require_once 'medoo.min.php';
  
      // Initialize
      $database = new medoo();
  
      $email = $database-&gt;get('MM_Users', 'Email', [
          'ID' =&gt; 1
      ]);
      return $email;
      }
      ?&gt;
  </code></pre>
  
  <p>And the error:</p>
  
  <p><strong>Parse error:</strong> syntax error, unexpected 'require_once' (T_REQUIRE_ONCE), expecting function (T_FUNCTION) in <strong>/myfiledirectory/example.php</strong> on line <strong>4</strong></p>
  
  <p>Any help is greatly appreciated! I'm not quite sure at what's going wrong.</p>
  
  <p>The php file that's running is :</p>
  
  <pre><code>&lt;?php
  require_once('signin.php');
  if(!loginUserAccount('bobby@gmail.com', 'AveryRandomPassword')){
  
      echo 'error';
  } else {
      echo $email;
  }
  ?&gt;
  </code></pre>
  
  <p>There's also a difference in the wrapping for require_once... this doesn't make a difference does it? And if so, which one is more advisable to use in a production environment?</p>