title: Is there an equivalent of var_dump for methods in PHP?
body: <p>I'm working on some legacy code and I need to get some information from an object. The price, for example. The price could be stored in a variable or it could be retrieved via a method. I don't yet know, only that it exists within the object.</p>
  
  <p>I can grab an object in the code and var_dump all of the variables to have a look-see at what's available at that point in the runtime. But sometimes what I need isn't returned by</p>
  
  <pre><code>$item-&gt;price
  </code></pre>
  
  <p>but instead needs to be retrieved by</p>
  
  <pre><code>$item-&gt;get_price()
  </code></pre>
  
  <p>It seems to me it would be really helpful to be able to dump information from methods in the same way as I can dump information from variables. </p>
  
  <p>So ideally I'd stick this command in the code, and it would return minimally a list of all methods that can be called on the object. Ideally, if those methods have no inputs, then it would also return their return values too.</p>
  
  <p>Does such a command exist in PHP? In any language?</p>