I'm having trouble understanding the behavior of a
WP_Post variable (and / or possibly the behavior of
As far as I know,
var_dump will inspect all data from a variable. From the PHP documentation:
This function displays structured information about one or more expressions that includes its type and value. Arrays and objects are explored recursively with values indented to show structure.
Then, why is it that
var_dump($post) doesn't show metadata, whereas
What's going on here? Is it some basic PHP behavior that I'm not aware? (I'm not sure if this question is because a lack of understanding how WordPress works or how PHP works. Sorry if this is the wrong site to ask).