From 8308b984cc61cb2464b9192961abaae4fe750591 Mon Sep 17 00:00:00 2001 From: Martijn Otto Date: Fri, 20 May 2016 11:21:33 +0200 Subject: Updated README and removed some debug code that was only relevant for PHP < 7 anyway --- README.md | 3 +++ zend/base.cpp | 62 ----------------------------------------------------------- 2 files changed, 3 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 2fdcdc4..3338779 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ The PHP-CPP library is a C++ library for developing PHP extensions. It offers a of well documented and easy-to-use classes that can be used and extended to build native extensions for PHP. The full documentation can be found on http://www.php-cpp.com. +Please note that this extension is designed to work with PHP versions 7.0 and up. If you +wish to create extensions for older versions, use PHP-CPP-LEGACY. + ABOUT ===== diff --git a/zend/base.cpp b/zend/base.cpp index 5d15011..4cb3cd8 100644 --- a/zend/base.cpp +++ b/zend/base.cpp @@ -12,68 +12,6 @@ */ namespace Php { -/** - * Store the object in the PHP object cache - * @param entry Class entry - * @param tsrm_ls - * @return MixedObject - */ -//MixedObject *Base::store(zend_class_entry *entry TSRMLS_DC) -//{ -// // allocate memory for the object -// MixedObject *result = (MixedObject *)emalloc(sizeof(MixedObject)); -// -// // store the new c++ object -// result->cpp = this; -// -// // store the class entry in the newly created object -// result->php.ce = entry; -// -// // initialize the object -// zend_object_std_init(&result->php, entry TSRMLS_CC); -// -//#if PHP_VERSION_ID < 50399 -// -// // tmp variable -// zval *tmp; -// -// // initialize the properties, php 5.3 way -// zend_hash_copy(result->php.properties, &entry->default_properties, (copy_ctor_func_t) zval_property_ctor, &tmp, sizeof(zval*)); -// -//#else -// -// // version higher than 5.3 have an easier way to initialize -// object_properties_init(&result->php, entry); -// -//#endif -// -//#ifdef ZTS -// -// // when in thread safety mode, the destruct method and free method have -// // an extra parameter holding thread information -// using DestructType = void(zend_object*,unsigned int,void***); -// using FreeType = void(zend_object*,void***); -// -//#else -// -// // not in thread mode: no special parameter for the tsrm_ls variable -// using DestructType = void(zend_object*,unsigned int); -// using FreeType = void(zend_object*); -// -//#endif -// -// // store the two destruct methods in temporary vars -// DestructType *destructMethod = &ClassImpl::destructObject; -// FreeType *freeMethod = &ClassImpl::freeObject; -// -// // the destructor and clone handlers are set to NULL. I dont know why, but they do not -// // seem to be necessary... -// _handle = zend_objects_store_put(result, (zend_objects_store_dtor_t)destructMethod, (zend_objects_free_object_storage_t)freeMethod, NULL TSRMLS_CC); -// -// // done -// return result; -//} - /** * Overridable method that is called right before an object is destructed */ -- cgit v1.2.3