title: How to create constructor with optional parameters?
body: <p>I have __construct($parameter)</p>
  
  <pre><code>public function __construct($nick) {
      $query = "SELECT * FROM Users WHERE nick='".$nick."'";
      $result = App::runQuery($query);
      $user = $result-&gt;fetch_object();
  
      $this-&gt;id = $user-&gt;id;
      $this-&gt;nick = $user-&gt;nick;
      $this-&gt;email = $user-&gt;email;
      $this-&gt;password = $user-&gt;password;
      $this-&gt;birthDay = $user-&gt;birthDay;
      $this-&gt;sex = $user-&gt;sex;
      $this-&gt;about = $user-&gt;about;
      $this-&gt;city = $user-&gt;city;
      $this-&gt;photo = $user-&gt;photo;
      $this-&gt;following = $user-&gt;following;
      $this-&gt;followers = $user-&gt;followers;
      $this-&gt;statu = $user-&gt;statu; 
  
  }
  </code></pre>
  
  <p>And now I want to have a default constructor without parameters like this:</p>
  
  <pre><code>public function __construct() {
  
      $this-&gt;id = NULL;
      $this-&gt;nick = NULL;
      $this-&gt;email = NULL;
      $this-&gt;password = NULL;
      $this-&gt;birthDay = NULL;
      $this-&gt;sex = NULL;
      $this-&gt;about = NULL;
      $this-&gt;city = NULL;
      $this-&gt;photo = NULL;
      $this-&gt;following = NULL;
      $this-&gt;followers = NULL;
      $this-&gt;statu = NULL; 
  
  }
  </code></pre>
  
  <p>But something is wrong and I get error like this:</p>
  
  <pre><code>Fatal error: Cannot redeclare User::__construct() in /Applications/MAMP/htdocs/xxx/Application/User.php on line 33
  </code></pre>
  
  <p>How can I have two constructors with parameters and without parameters at the same time?</p>