summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2006-08-08 09:46:46 +0000
committerDerick Rethans <derick@php.net>2006-08-08 09:46:46 +0000
commit5794832a72b0fb64793c48b9cf29cc282db1fec6 (patch)
tree739b102bf4d9da9189c4b4ba93a0f0d4dadc25c9
parentb8617a6183cffb7a028fae686819b49a3480a449 (diff)
downloadphp-git-5794832a72b0fb64793c48b9cf29cc282db1fec6.tar.gz
- Added some docs here so that nobody needs to figure it out once more.
-rw-r--r--Zend/zend_operators.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index ba86413044..8274332417 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -66,6 +66,15 @@ ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_cl
ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC);
END_EXTERN_C()
+/**
+ * Checks whether the string "str" with the length "length" is a numeric string.
+ *
+ * The function returns 0 if the string did not contain a string; IS_LONG if
+ * the string contained a number that fits in the integer range and IS_DOUBLE
+ * in case it did not. The long value is returned into the pointer *lval if
+ * that pointer was not NULL or into the pointer *dval if that pointer was not
+ * NULL.
+ */
static inline zend_bool is_numeric_string(char *str, int length, long *lval, double *dval, int allow_errors)
{
long local_lval;