kernel in C++ and php