From fec2fca2df568aa059e93d59bcfb63daec686583 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sat, 26 Jul 2014 15:17:41 +0200 Subject: modifed class_exists function to work with a char* without having to convert it into a std::string --- include/call.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/call.h') diff --git a/include/call.h b/include/call.h index 05c5955..80ef6c9 100644 --- a/include/call.h +++ b/include/call.h @@ -15,6 +15,9 @@ namespace Php { /** * List of functions that are available for use in PHP */ +bool class_exists(const char *classname, size_t size, bool autoload = true); +bool class_exists(const char *classname, bool autoload = true) { return class_exists(classname, strlen(classname), autoload); } +bool class_exists(const std::string &classname, bool autoload = true) { return class_exists(classname.c_str(), classname.size(), autoload); } Value eval(const std::string &phpCode); /** -- cgit v1.2.3