title: What's the difference between "double underscore" and "underscore x"?
body: <p>In PHP, specifically in Wordpress, what's the difference between <code>__('string')</code> and <code>_x('string')</code>?</p>
  
  <p>I'm reading Wordpress documentation and confused. The following good example of the confusion is drawn from example code on the <a href="https://codex.wordpress.org/Function_Reference/register_post_type" rel="noreferrer">Wordpress doc</a> for <code>register_post_type()</code>:</p>
  
  <pre><code>$labels = array(
      'name'               =&gt; _x( 'Books', 'post type general name', 'your-plugin-textdomain' ),
      'singular_name'      =&gt; _x( 'Book', 'post type singular name', 'your-plugin-textdomain' ),
      'menu_name'          =&gt; _x( 'Books', 'admin menu', 'your-plugin-textdomain' ),
      'name_admin_bar'     =&gt; _x( 'Book', 'add new on admin bar', 'your-plugin-textdomain' ),
      'add_new'            =&gt; _x( 'Add New', 'book', 'your-plugin-textdomain' ),
      'add_new_item'       =&gt; __( 'Add New Book', 'your-plugin-textdomain' ),
      'new_item'           =&gt; __( 'New Book', 'your-plugin-textdomain' ),
      'edit_item'          =&gt; __( 'Edit Book', 'your-plugin-textdomain' ),
      'view_item'          =&gt; __( 'View Book', 'your-plugin-textdomain' ),
      'all_items'          =&gt; __( 'All Books', 'your-plugin-textdomain' ),
      'search_items'       =&gt; __( 'Search Books', 'your-plugin-textdomain' ),
      'parent_item_colon'  =&gt; __( 'Parent Books:', 'your-plugin-textdomain' ),
      'not_found'          =&gt; __( 'No books found.', 'your-plugin-textdomain' ),
      'not_found_in_trash' =&gt; __( 'No books found in Trash.', 'your-plugin-textdomain' )
  );
  </code></pre>