title: serialize / unserialize php object
body: <p>I am having trouble understanding the concept of serialize/unserialize in PHP.</p>
  
  <p>Assume I have a very simple PHP object (class someObject) and after setting the attributes of that object I want to serialize it:</p>
  
  <p>So I call: <code>serialize($someObject)</code>;</p>
  
  <p>I want to transfer this serialized object into another php skript via a html form so I set it as a hidden value:</p>
  
  <pre><code>&lt;input type="hidden" name="someObject" value="&lt;? print $someObject; ?&gt;"
  </code></pre>
  
  <p>In the next php script I want to use unserialize to get my object back and transfer it e.g. to a databae.</p>
  
  <pre><code>$unserialize = unserialize($_POST['someObject'])
  </code></pre>
  
  <p>But this always returns BOOL(false) - so what am I missing here?</p>
  
  <p>Thanks for your help!</p>