How do I find all objects under an object? When I try to print out the possible options of Node::load(10) 

I just get null. But I know that there are options as Node::load(10)-&gt;field_name-&gt;value gives the value of the field. 

I have tried using dpm as well as json_encode.

examples:

dpm(Node::load(10)-&gt;getFieldDefinitions());
dpm(Node::load(10)-&gt;toArray());
json_encode(Node::load(10))
I tried the following command, and it returns the expected output.

drush php-eval 'var_export(\Drupal\node\Entity\Node::load(1));'


The only case where I get NULL as output is when I pass to Node::load() a node ID that doesn't exist.

The fact Node::load() loads the data from the database doesn't matter; in fact, the method still returns an object of the Node class.

Drupal\node\Entity\Node::__set_state(array(
   'in_preview' =&gt; NULL,
   'values' =&gt; 
  array (
    'vid' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'langcode' =&gt; 
    array (
      'x-default' =&gt; 'en',
    ),
    'revision_timestamp' =&gt; 
    array (
      'x-default' =&gt; '1465363710',
    ),
    'revision_uid' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'revision_log' =&gt; 
    array (
      'x-default' =&gt; NULL,
    ),
    'nid' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'type' =&gt; 
    array (
      'x-default' =&gt; 'page',
    ),
    'uuid' =&gt; 
    array (
      'x-default' =&gt; '88E2D589-473B-4FE9-9A5A-F1F768A5E4E8',
    ),
    'isDefaultRevision' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'title' =&gt; 
    array (
      'x-default' =&gt; 'Test',
    ),
    'uid' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'status' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'created' =&gt; 
    array (
      'x-default' =&gt; '1465363684',
    ),
    'changed' =&gt; 
    array (
      'x-default' =&gt; '1465363710',
    ),
    'promote' =&gt; 
    array (
      'x-default' =&gt; '0',
    ),
    'sticky' =&gt; 
    array (
      'x-default' =&gt; '0',
    ),
    'revision_translation_affected' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'default_langcode' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'body' =&gt; 
    array (
      'x-default' =&gt; 
      array (
        0 =&gt; 
        array (
          'value' =&gt; '&lt;p&gt;Test.&lt;/p&gt;
',
          'summary' =&gt; '',
          'format' =&gt; 'basic_html',
        ),
      ),
    ),
  ),
   'fields' =&gt; 
  array (
  ),
   'fieldDefinitions' =&gt; NULL,
   'languages' =&gt; NULL,
   'langcodeKey' =&gt; 'langcode',
   'defaultLangcodeKey' =&gt; 'default_langcode',
   'activeLangcode' =&gt; 'x-default',
   'defaultLangcode' =&gt; 'en',
   'translations' =&gt; 
  array (
    'x-default' =&gt; 
    array (
      'status' =&gt; 1,
    ),
  ),
   'translationInitialize' =&gt; false,
   'newRevision' =&gt; false,
   'isDefaultRevision' =&gt; '1',
   'entityKeys' =&gt; 
  array (
    'bundle' =&gt; 'page',
    'id' =&gt; '1',
    'revision' =&gt; '1',
    'uuid' =&gt; '88E2D589-473B-4FE9-9A5A-F1F768A5E4E8',
  ),
   'translatableEntityKeys' =&gt; 
  array (
    'label' =&gt; 
    array (
      'x-default' =&gt; 'Test',
    ),
    'langcode' =&gt; 
    array (
      'x-default' =&gt; 'en',
    ),
    'status' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'uid' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
    'default_langcode' =&gt; 
    array (
      'x-default' =&gt; '1',
    ),
  ),
   'validated' =&gt; false,
   'validationRequired' =&gt; false,
   'entityTypeId' =&gt; 'node',
   'enforceIsNew' =&gt; NULL,
   'typedData' =&gt; NULL,
   'cacheContexts' =&gt; 
  array (
  ),
   'cacheTags' =&gt; 
  array (
  ),
   'cacheMaxAge' =&gt; -1,
   '_serviceIds' =&gt; 
  array (
  ),
))


Even running drush php-eval 'var_export(\Drupal\node\Entity\Node::load(1)-&gt;toArray());' (i.e. using the toArray() method you tried) gave me an output different from NULL. In this case, using a node ID that doesn't exist, you get a Call to a member function toArray() on a non-object error.

array (
  'nid' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1',
    ),
  ),
  'uuid' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '994535DB-7C4E-42F2-94CE-576DA3E9FC0B',
    ),
  ),
  'vid' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1',
    ),
  ),
  'langcode' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; 'en',
    ),
  ),
  'type' =&gt; 
  array (
    0 =&gt; 
    array (
      'target_id' =&gt; 'page',
    ),
  ),
  'title' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; 'Test',
    ),
  ),
  'uid' =&gt; 
  array (
    0 =&gt; 
    array (
      'target_id' =&gt; '1',
    ),
  ),
  'status' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1',
    ),
  ),
  'created' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1466285938',
    ),
  ),
  'changed' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1466285973',
    ),
  ),
  'promote' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '0',
    ),
  ),
  'sticky' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '0',
    ),
  ),
  'revision_timestamp' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1466285973',
    ),
  ),
  'revision_uid' =&gt; 
  array (
    0 =&gt; 
    array (
      'target_id' =&gt; '1',
    ),
  ),
  'revision_log' =&gt; 
  array (
  ),
  'revision_translation_affected' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1',
    ),
  ),
  'default_langcode' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '1',
    ),
  ),
  'path' =&gt; 
  array (
  ),
  'body' =&gt; 
  array (
    0 =&gt; 
    array (
      'value' =&gt; '&lt;p&gt;Testing a Drupal function.&lt;/p&gt;
',
      'summary' =&gt; '',
      'format' =&gt; 'basic_html',
    ),
  ),
)


Also, remember to fully qualify the class with its namespace, or add a use \Drupal\node\Entity\Node; line before using the class.

Using drush php-eval 'print json_encode(\Drupal\node\Entity\Node::load(1));' I just get {"in_preview":null} because json_encode() doesn't prints out all the object properties.