title: how to convert zval* to an object?
body: <p>I have:</p>
  
  <pre><code>PHP_METHOD(Car, cls_ref)
  {
      Car *car;
      //Car2 *obj11;
      Car2 *car2;
      zval* obj11;
      zend_class_entry ce2 = zend_fetch_class("Car2", sizeof("Car2")-1, ZEND_FETCH_CLASS_DEFAULT TSRMLS_CC);
  
  
       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &amp;obj11,ce2) == FAILURE) {
          RETURN_NULL();
      }
  
      car_object *obj = (car_object *)zend_object_store_get_object(
          getThis() TSRMLS_CC);
    /*  car2_object *objj = (car2_object *)zend_object_store_get_object(
          getThis() TSRMLS_CC);
         car2=(objj-&gt;car2);
      */  
      car = obj-&gt;car;
      if (car != NULL) {
          //cout&lt;&lt;"in car 2 ref"&lt;&lt;endl;
  
          //car2-&gt;reference(s);
      //  (car-&gt;cls_ref((Car2&amp;)car2));
      car-&gt;cls_ref((Car2&amp;)obj11);
      }
  
  }
  
  where void Car::cls_ref(Car2 &amp;obj){...}
  </code></pre>
  
  <p>I to solve this. I have error:</p>
  
  <blockquote>
    <p>error: cannot convert ‘Car2*’ to ‘zval*’ in initialization
        /home/vehicles.cc:191: error: conversion from ‘zend_class_entry*’ to non-scalar type ‘zend_class_entry’ requested `(the errors are at the point where i intialize obj11 and at ce2=..)</p>
  </blockquote>