title: defined or define in PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7008830/why-defined-define-syntax-in-defining-a-constant">Why &#39;defined() || define()&#39; syntax in defining a constant</a>  </p>
  </blockquote>
  
  
  
  <p>This piece of code is created by the zf tool that Zend Framework provides. </p>
  
  <pre><code>defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
  </code></pre>
  
  <p>My questions is : 
  What is the purpose of this line of code?  There are no conditional statements such as if, switch. Does it imply a conditional statement automatically? </p>
  
  <p>Here is how i understand it: 
  if APPLICATION_PATH is defined, leave it alone else set it to :  <code>realpath(dirname(__FILE__) . '/../application')</code>.</p>
  
  <p>If my assumption is true this is a really confusing syntax.</p>
  
  <p>Any help will be appreciated.</p>