title: Empty() function might not be working with Constants in PHP
body: <p>I've been looking at it for a while and cannot figure out what the problem might be:</p>
  
  <p>My Code:</p>
  
  <pre><code>&lt;?php
  
      session_start();
  
      require "includes/config.php";
      require "includes/database.php";
      require "twitteroauth/twitteroauth.php";
  
      if(empty(CONSUMER_KEY) &amp;&amp; empty(CONSUMER_SECRET))
      {
          exit("Please define Consumer Key and Consumer Secret Keys");
      }
  
      $connection = new TwitterOAuth(CONSUMER_KEY,CONSUMER_SECRET);
      $request_token = $connection-&gt;getRequestToken(OAUTH_CALLBACK);
  
      // Temporary credentials to make requests to Twitter
      $_SESSION["oauth_token"] = $request_token["oauth_token"];
      $_SESSION["oauth_token_secret"] = $request_token["oauth_token_secret"];
  
      switch ($connection-&gt;http_code)
      {
          case 200:
              $url = $connection-&gt;getAuthorizeURL($request_token);
              header("Location:".$url);
              break;
          default:
              die("Connection to Twitter failed. Please try again."); 
      }
  
  ?&gt;
  </code></pre>
  
  <p>And the error is:</p>
  
  <pre><code> ## 
  Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/.../connect.php on line 9
   ##
  </code></pre>
  
  <p>The line 9 part starts from </p>
  
  <pre><code>if(empty(CONSUMER_KEY) &amp;&amp; empty(CONSUMER_SECRET))
  {
      exit("Please define Consumer Key and Consumer Secret Keys");
  }
  </code></pre>
  
  <p>CONSUMER_KEY and CONSUMER_SECRET, they are constants and defined in "includes/config.php" like below:</p>
  
  <pre><code>$config = parse_ini_file("config.ini");
  define("CONSUMER_KEY",$config["TwitterAPI"]["Consumer_Key"]);
  define("CONSUMER_SECRET",$config["TwitterAPI"]["Consumer_Secret"]);
  </code></pre>