title: syntax error, unexpected T_FUNCTION, expecting ')'
body: <p>hi i have purchased theme but i think there is bug in contact form submission. theme use ajax to submit contact form.</p>
  
  <p>link of contact form <code>http://192.185.83.133/~lbrisas/TRY/ibrisas/contact.html</code></p>
  
  <p>when you fill complete form and submit i will submit form using jquery ajax to contact.php file and here is code for the contact.php</p>
  
  <p>code</p>
  
  <pre><code>&lt;?php
  
      spl_autoload_register(function($class_name){
          $file_name = str_replace('\\', '/', $class_name);
          $file_name = str_replace('_', '/', $file_name);
          $file = dirname(__FILE__) . "/lib/$file_name.php";
          if(is_file($file)) include $file;
      });
  
      use HybridLogic\Validation\Validator;
      use HybridLogic\Validation\Rule;
  
      $CONFIG = array(
          /* Mail Options */
          'mail_send_to'      =&gt;  'vishalnthoriya@gmail.com', 
          'mail_contents'     =&gt;  'mail-content.php', 
          'mail_failed_msg'   =&gt;  'An unknown error has occured', 
  
          /* Notification Messages */
          'form_errors_msg'   =&gt;  '&lt;h4&gt;The following errors were encountered&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;%s&lt;/li&gt;&lt;/ul&gt;', 
          'form_invalid_msg'  =&gt;  'The form is invalid', 
          'form_success_msg'  =&gt;  '&lt;h4&gt;Thank you&lt;/h4&gt;Your message has been sent, we\'ll get back to you shortly :)'
      );
  
      function createFormMessage( $formdata )
      {
          global $CONFIG;
  
          ob_start();
  
          extract($formdata);
          include $CONFIG['mail_contents'];
  
          return ob_get_clean();
      }
  
      function cleanInput($input) {
          $search = array(
              '@&lt;script[^&gt;]*?&gt;.*?&lt;/script&gt;@si',   // Strip out javascript
              '@&lt;[\/\!]*?[^&lt;&gt;]*?&gt;@si',            // Strip out HTML tags
              '@&lt;style[^&gt;]*?&gt;.*?&lt;/style&gt;@siU',    // Strip style tags properly
              '@&lt;![\s\S]*?--[ \t\n\r]*&gt;@'         // Strip multi-line comments
          );
  
          $output = preg_replace($search, '', $input);
          return $output;
      }
  
      function sanitize($input) {
          if (is_array($input)) {
              foreach($input as $var=&gt;$val) {
                  $output[$var] = sanitize($val);
              }
          }
          else {
              if (get_magic_quotes_gpc()) {
                  $input = stripslashes($input);
              }
              $input  = cleanInput($input);
              $output = $input;
          }
          return $output;
      }
  
      $formdata = sanitize( $_POST['ContactForm'] );
      $response = array();
      $validator = new Validator();
      $validator
          -&gt;set_label('name', 'Name')
          -&gt;set_label('email', 'Email')
          -&gt;set_label('subject', 'Subject')
          -&gt;set_label('comment', 'Comment')
          -&gt;add_filter('name', 'trim')
          -&gt;add_filter('email', 'trim')
          -&gt;add_filter('email', 'strtolower')
          -&gt;add_filter('subject', 'trim')
          -&gt;add_rule('name', new Rule\NotEmpty())
          -&gt;add_rule('email', new Rule\NotEmpty())
          -&gt;add_rule('email', new Rule\Email())
          -&gt;add_rule('subject', new Rule\NotEmpty())
          -&gt;add_rule('comment', new Rule\NotEmpty());
  
      if( $validator-&gt;is_valid( $formdata ) )
      {
          include 'lib/swiftmail/swift_required.php';
  
          $transport = Swift_MailTransport::newInstance();
          $mailer = Swift_Mailer::newInstance($transport);
  
          $body = createFormMessage($formdata);
  
          $message = Swift_Message::newInstance();
          $message
              -&gt;setSubject($formdata['subject'])
              -&gt;setFrom($formdata['email'])
              -&gt;setTo($CONFIG['mail_send_to'])
              -&gt;setBody($body, 'text/html');
  
          if( !$mailer-&gt;send($message) ) {
              $response['success'] = false;
              $response['message'] = $CONFIG['mail_failed_msg'];
          } else {
              $response['success'] = true;
              $response['message'] = $CONFIG['form_success_msg'];
          }
      } else {
          $response = array( 'success'=&gt;false, 'message'=&gt;sprintf($CONFIG['form_errors_msg'], implode('&lt;/li&gt;&lt;li&gt;', $validator-&gt;get_errors() ) ) );
      }
  
      echo json_encode($response);
  ?&gt;
  </code></pre>
  
  <p>here is error
  :Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/lbrisas/public_html/TRY/ibrisas/php/contact.php on line 3</p>
  
  <p>thanks in advance </p>