title: Is it preferable to define classes and functions at the beginning or at the end of code?
body: <p>The Javascript tutorial I follow always defines before using, but my PHP book always defines at the end, and in fact points out that this is considered good practice. </p>
  
  <p>Is there a reason to do it one way or the other? </p>