Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv8246
Modified Files:
php_var_type.hpp
Log Message:
Added "operator char*" to make it easy to display the type of a var as a string.
Index: php_var_type.hpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var_type.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** php_var_type.hpp 2 Sep 2003 00:58:10 -0000 1.2
--- php_var_type.hpp 2 Sep 2003 01:09:00 -0000 1.3
***************
*** 45,48 ****
--- 45,60 ----
}
+ operator char*() {
+ if(is_null) return "NULL";
+ if(is_string) return "String";
+ if(is_int) return "Integer";
+ if(is_float) return "Float";
+ if(is_bool) return "Boolean";
+ if(is_array) return "Array";
+ if(is_resource) return "Resource";
+ if(is_object) return "Object";
+ return -1;
+ }
+
php_var_type &operator= (const int rhs) {
*this = php_var_type(); // reset
|