/** * Simple.h * * A very simple extension that does almost nothing * * @author Emiel Bruijntjes * @copyright 2013 Copernica BV */ #include #include #include /** * Namespace to use */ using namespace std; Php::Value bubblesort(Php::Parameters ¶ms) { cout << "start bubblesort" << endl; // the array that was passed Php::Value array(params[0]); cout << "go return" << endl; return array; // size of the array int size = array.size(); cout << "convert to native" << endl; int *x = new int[size]; for (int i=0; i myCustomClass("my_class"); myCustomClass.method("mymethod", &MyCustomClass::myMethod); myCustomClass.method("__construct", &MyCustomClass::__construct); // add to extension extension.add(myCustomClass); // return the module entry return extension.module(); } }