title: How to use an instantiated object across different PHP files
body: <p>This is a very basic php question : suppose I have 3 files, file1, file2, file3. </p>
  
  <p>In file1 I declare a class called Object. In file2, I have a method that instantiate Object, call it $object, and call this method Method</p>
  
  <p>In file2, this method looks like</p>
  
  <pre><code>public function Method(){
  $object = new Object;
  ...
  require_once(file3);
  $anotherobject = new AnotherObject;
  $anotherobject-&gt;method();
  
  }
  </code></pre>
  
  <p>Finally, in file 3 I declare another AnotherObject. So, if I have a method 'method' in file3, can I refer to $object's properties directly, or could I access ony the static method of Object ?</p>