php & so error: class not found
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1502244/how-can-i-use-c-code-to-interact-with-php">How can I use C++ code to interact with PHP?</a>  </p>
</blockquote>



<p>I have the following test.php file:</p>

<pre><code>&lt;html&gt;
 &lt;head&gt; 
 &lt;title&gt;Personalized Hello World&lt;/title&gt; 
 &lt;/head&gt; 

 &lt;body&gt; 

 &lt;?php include "/home/test.hpp"; 

$s= new example();

 ?&gt; 


 &lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>the test.hpp file is:</p>

<pre><code>#ifndef TEST_
#define TEST_


class example
{
    public:
    example();
    void show();
};

#endif
</code></pre>

<p>I have the test.so file.
I compile .php with: <code>php test.php -dextension=test.so</code> </p>

<p>I have the error: </p>

<pre><code>PHP Fatal error:  Class 'example' not found in /var/www/test.php on line 10
</code></pre>

<p>How to resolve this? THX</p>
