2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 2.00 of the Zend license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.zend.com/license/2_00.txt. |
12 | If you did not receive a copy of the Zend license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@zend.com so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
18 #ifndef incl_HPHP_ZEND_FUNCTIONS_H_
19 #define incl_HPHP_ZEND_FUNCTIONS_H_
21 #include <folly/Range.h>
25 #include "hphp/runtime/base/datatype.h"
28 ///////////////////////////////////////////////////////////////////////////////
29 // zend logic: These are not string utilities, but zend's special language
33 * Testing whether a string is numeric or not.
35 DataType
is_numeric_string(const char* str
, int length
, int64_t* lval
,
36 double* dval
, int allow_errors
= 0,
37 int* overflow_info
= nullptr);
40 * Whether or not a string is a valid variable name.
42 bool is_valid_var_name(const char *var_name
, int len
);
44 ///////////////////////////////////////////////////////////////////////////////
47 * Adapted from ap_php_conv_10 for fast signed integer to string conversion.
49 folly::StringPiece
conv_10(int64_t num
, char* buf_end
);
51 ///////////////////////////////////////////////////////////////////////////////
54 #endif // incl_HPHP_ZEND_FUNCTIONS_H_