title: What is the difference between -> and :: in PHP?
body: <p>This thing has been bugging me for long and I can't find it anywhere!</p>
  
  <p>What is the difference when using classes in php between :: and -></p>
  
  <p>Let me give an example.</p>
  
  <p>Imagine a class named MyClass and in this class there is a function myFunction</p>
  
  <p>What is the difference between using:</p>
  
  <pre><code>MyClass myclass = new MyClass
  myclass::myFunction();
  </code></pre>
  
  <p>or </p>
  
  <pre><code>MyClass myclass = new MyClass
  myclass-&gt;myFunction();
  </code></pre>
  
  <p>Thank you</p>