title: PHP Serialization and deserialization concept
body: <p>I tried this serialization code but the value gets printed is not what I expected.It has to display "You are objectifying me" when last display function is called but it is not doing so.Can anyone point what is the error in the code.</p>
  
  <pre><code> &lt;?php
              class ClassTOSerialize
              {
                  public $storedStatement="data";
                  public function _constructor($statement)
                  {
                      $this-&gt;storedStatement=$statement;
                  }
                  public function display()
                  {
                      print($this-&gt;storedStatement."&lt;BR&gt;");
                  }
  
              }
              $instance1=new ClassTOSerialize("You are objectifying me!");
              $instance1-&gt;display();
              $serialization=serialize($instance1);
              $instance2=  unserialize($serialization);
              $instance2-&gt;display();
  
  
              /*
               * 
               */
              ?&gt;
  </code></pre>