Finished extension
Add tests from php-src