title: PHP form post, automatically mapping to an object (model binding)
body: <p>I do a lot of ASP.NET MVC 2 development, but I'm tackling a small project at work and it needs to be done in PHP.  </p>
  
  <p>Is there anything built-in to PHP to do model binding, mapping form post fields to a class?  Some of my PHP code currently looks like this:</p>
  
  <pre><code>class EntryForm
  {
      public $FirstName = "";
      public $LastName = "";
  }
  
      $EntryForm = new EntryForm();
  
  if ($_POST &amp;&amp; $_POST["Submit"] == "Submit")
  {
      $EntryForm-&gt;FirstName = trim($_POST["FirstName"]);
      $EntryForm-&gt;LastName = trim($_POST["LastName"]);
  }
  </code></pre>
  
  <p>Is there anything built-in to a typical PHP install that would do such mapping like you'd find in ASP.NET MVC, or does it require an additional framework?</p>