title: What does the syntax '%s' and '%d' mean as shorthand for calling a variable?
body: <p>What do '%s' and '%d' mean in this example?  It appears its shorthand for calling variables.  Does this syntax only work within a class?</p>
  
  <pre><code>// Class
  class Building {
      // Object variables/properties
      private $number_of_floors = 5; // These buildings have 5 floors
      private $color;
  
      // Class constructor
      public function __construct($paint) {
          $this-&gt;color = $paint;
      }
  
      public function describe() {
          printf('This building has %d floors. It is %s in color.', 
              $this-&gt;number_of_floors, 
              $this-&gt;color
          );
      }
  }
  </code></pre>
  
  <p>EDIT:  The part that is confusing to me is how does the compiler know which variable %d is referring to?  Does it just go in the order that the member variables were declared?</p>