title: Making use of var_dump on WordPress functions
body: <p>I trying to get deep into WordPress development, I was wondering when we do <code>var_dump($post-&gt;post_id)</code>, it gives a list of objects that, that function has. The reason I said objects, is I don't know what they are. While it gives you a comprehensive list of properties that you can access as the WordPress codex <a href="https://codex.wordpress.org/Function_Reference/$post" rel="nofollow">page</a> state. My question is how can I access other function and its properties like:</p>
  
  <pre><code>`get_the_category();`, I might be naive to get a list of properties like 
  $category = get_the_category();
  foreach ($category as $cat) {
  echo $cat;
  }
  </code></pre>
  
  <p>How can I access properties of a WordPress function, a example would be something like <code>$category-&gt;ID()</code> or other properties, other example might include</p>
  
  <pre><code>      &lt;?php 
          if ( have_posts() ) {
            while ( have_posts() ) {
              the_post(); 
          ?&gt;
          &lt;?php 
                $test = get_cat_ID($post-&gt;ID); 
                var_dump($test)
          ?&gt;
  
          &lt;?php } 
        } 
        ?&gt;
  </code></pre>
  
  <p>But in that example, I get a <code>int(0)</code>, so how can I get different properties on a post, like its category, slug, taxonomies etc. </p>