title: Is there any way to show, or throw, a PHP warning?
body: <p>I have a <code>select()</code> method in a database class, that has an optional boolean argument <code>$sum</code>. This argument is used to say if the method should use <code>COUNT(*)</code> or not too.</p>
  
  <p>I would like to show a warning, like those normal PHP errors, if I try to access <code>$class-&gt;sum</code> if the attribute is not set (i.e. when I call <code>select()</code> with <code>$sum == false</code>.</p>
  
  <p>Is there any way to show a warning like this, or I should just echo an error and be happy?</p>