title: Should one avoid constructor use for field initialization in PHP?
body: <p>I just had a talk with two colleagues yesterday, who told me that I should stop using constructors for field initialization in PHP.</p>
  <p>Their reasoning was that if instances of the class would be created in different places and I decided to add another constructor parameter, all places where that class is instantiated would need to be updated with the new parameter. This would be tight coupling so to speak</p>
  <p>I am quite new to PHP and in C# I would use the constructor and just do this:</p>
  <pre><code>public class Example 
  {
      public int X { get; set;}
      public int Y { get; set;}
  
      public Example(int x, int y)
      {
          X = x;
          Y = y;
      }
  
  }
  </code></pre>
  <p>Now I add another parameter by overloading the existing constructor:</p>
  <pre><code>public class Example 
  {
      public int X { get; set;}
      public int Y { get; set;}
      public int Z { get; set;}
  
      public Example(int x, int y)
      {
          X = x;
          Y = y;
      }
  
      public Example(int x, int y, int z) : this(x, y)
      {
          Z = z;
      }
  
  }
  </code></pre>
  <p>Doing it like this wouldn't require any change to existing code, right?</p>
  <p>As far as I know PHP does not have constructor overloading like C# or Java. Is that the reason why one should avoid constructor use in PHP?</p>
  <p>Any ideas on the topic are appreciated.</p>