CVarRef var = some_function(); // get a PHP variable if (var.isObject()) { std::cout << "This is an object!" << std::endl; }
void some_function(CVarRef arg) { if (arg.isObject()) { std::cout << "This argument is an object!" << std::endl; } }This code defines a function that takes a CVarRef argument and checks if it is an object using the isObject() method of CVarRef. If it is an object, it prints "This argument is an object!" to the console. Package/library: PHP CPP library.