# Functions
Abs abs().
Add ...
AddSlashes Addslashes addslashes().
ArgStringToAryInterface ...
ArrayChunk array_chunk().
ArrayColumn array_column().
ArrayCombine array_combine().
ArrayFill array_fill().
ArrayFlip array_flip().
ArrayKeyExists array_key_exists().
ArrayKeyPluck ...
ArrayKeys array_keys().
ArrayMerge array_merge().
ArrayMultiPluck ...
ArrayPad array_pad().
ArrayPluck ...
ArrayPop array_pop() Pop the element off the end of slice.
ArrayPush array_push() Push one or more elements onto the end of slice.
ArrayRand array_rand().
ArrayRandMap 随即.
ArrayRemoveRepeatedElement 数组去重.
ArrayReverse array_reverse().
ArrayShift array_shift() Shift an element off the beginning of slice.
ArraySlice array_slice().
ArrayStringUniq 数组去重.
ArrayUnshift array_unshift() Prepend one or more elements to the beginning of a slice.
ArrayValues array_values().
AryInterfaceToArgString ...
AryMapInterfaceToAryMapString ...
AryMapStringToAryMapInterface ...
Base64Decode base64_decode().
Base64Encode base64_encode().
BaseConvert base_convert().
BaseName Basename basename().
Bin2hex bin2hex().
BinDec Bindec bindec().
ByteReplace ...
Ceil ceil().
CheckDate Checkdate checkdate() Validate a Gregorian date.
Chmod chmod().
Chown chown().
Chr chr().
ChunkSplit chunk_split().
ConvertBson 构建 bson.D 查询数据.
Copy copy().
Crc32 crc32().
Date date().
DateTimeParse 时间解析.
DateToJulian converts a date to a Julian day number.
Day 获取起止日期中的天 s,e Y-m-d.
DecBin Decbin decbin().
Dechex dechex().
Decoct decoct().
Delete delete().
Die die().
Divide 查询是否被整除.
DomainStatic ...
Duration ...
Echo echo.
Empty empty().
Exec exec() returnVar, 0: succ; 1: fail Return the last line from the result of the command.
Exit exit().
Explode explode().
ExtractIP returns a real ip.
Fclose fclose().
FGetCsv Fgetcsv fgetcsv().
FileExists file_exists().
FileGetContents file_get_contents().
FileMTime Filemtime filemtime().
FilePutContents file_put_contents().
FileSize filesize().
Floor floor().
FormatDate ...
FormatDateTime ...
FormatDuring 格式化秒.
FromYearWeek ...
FunctionName ...
GetAppRootPath 获取应用程序根目录.
GetCurrentDirectory 获取当前目录.
GetCwd Getcwd getcwd().
Getenv getenv().
GetHostByAddr Gethostbyaddr gethostbyaddr() Get the Internet host name corresponding to a given IP address.
GetHostByName Gethostbyname gethostbyname() Get the IPv4 address corresponding to a given Internet host name.
GetHostByNameL Gethostbynamel gethostbynamel() Get a list of IPv4 addresses corresponding to a given Internet host name.
GetHostName Gethostname gethostname().
GetHourDiffer 获取相差时间.
GetLocalIP ...
GetMissingElement ...
GetParentDirectory 获取上级目录.
Glob glob().
Hex2bin hex2bin().
Hexdec hexdec().
Hour Day 获取起止日期中的小时 YmdH.
HtmlEntities Htmlentities htmlentities().
HTMLEntityDecode html_entity_decode().
HTTPBuildQuery http_build_query().
Implode implode().
InArray in_array() haystack supported types: slice, array or map.
InMultiArray in_array() haystack supported types: slice, array or map.
InterfaceToAryMapStringInterface ...
InterfaceToAryMapStringString ...
InterfaceToString ...
IP2long ip2long() IPv4.
IsDir is_dir().
IsFile is_file().
IsNan is_nan().
IsNumeric is_numeric() Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part.
ISOWeekday returns the ISO 8601 weekday number of given day.
IsReadable is_readable().
IsWriteable is_writeable().
JS ...
JSONDecode json_decode().
JSONEncode json_encode().
JSONString ...
JulianToDate converts a Julian day number to a date.
LCFirst Lcfirst lcfirst().
Levenshtein levenshtein() costIns: Defines the cost of insertion.
Long2ip long2ip() IPv4.
LTrim Ltrim ltrim().
MapInterfaceToMapString ...
MapStringToMapInterface ...
MarshalHTML ...
MarshalJS ...
Max max().
MbStrLen MbStrlen mb_strlen().
Md5 md5().
Md5File md5_file().
MemoryGetPeakUsage memory_get_peak_usage() return in bytes.
MemoryGetUsage memory_get_usage() return in bytes.
Min min().
Mkdir mkdir().
MkdirAll 创建文件夹.
Month 获取当前月份前一年的月份 d Y-m-d.
MonthDate 获取当前日期的当月的第一天和最后一天.
MultiArray 判断二维数组里面是不是只有一条数据.
NewReplacer ...
NextMonthDate 获取当前日期的下个月的第一天和最后一天.
Nl2br nl2br() \n\r, \r\n, \r, \n.
Now time.Now().
NumberFormat number_format() decimals: Sets the number of decimal points.
Octdec Octdec().
Ord ord().
Pack pack().
ParseStr parse_str() f1=m&f2=n -> map[f1:m f2:n] f[a]=m&f[b]=n -> map[f:map[a:m b:n]] f[a][a]=m&f[a][b]=n -> map[f:map[a:map[a:m b:n]]] f[]=m&f[]=n -> map[f:[m n]] f[a][]=m&f[a][]=n -> map[f:map[a:[m n]]] f[][]=m&f[][]=n -> map[f:[map[]]] // Currently does not support nested slice.
ParseURL parse_url() Parse a URL and return its components -1: all; 1: scheme; 2: host; 4: port; 8: user; 16: pass; 32: path; 64: query; 128: fragment.
ParseURLRaw parses raw into URL.
PassThru Passthru passthru() returnVar, 0: succ; 1: fail.
PathInfo Pathinfo pathinfo() -1: all; 1: dirname; 2: basename; 4: extension; 8: filename Usage: Pathinfo("/home/go/path/src/php2go/php2go.go", 1|2|4|8).
Pi pi().
Pipeline gets aggregation pipeline from a string.
PrevMonthDate NextMonthDate 获取当前日期的上个月的第一天和最后一天.
Putenv putenv() The setting, like "FOO=BAR".
QuoteMeta Quotemeta quotemeta().
Rand rand() Range: [0, 2147483647].
Random 随机字符串.
RandomBytes random_bytes().
RandomInt random_int().
RawURLDecode Rawurldecode rawurldecode().
RawURLEncode Rawurlencode rawurlencode().
RealPath Realpath realpath().
Rename rename().
Round round().
RTrim Rtrim rtrim().
Sha1 sha1().
Sha1File sha1_file().
SimilarText similar_text().
Sleep sleep().
Soundex soundex() Calculate the soundex key of a string.
SplitString 分割字符串 p 字符串, split 分隔符 , space 是否需要保留文字中的空格.
StartDate returns the starting date (Monday) of the given ISO 8601 week.
Stat stat().
Static ...
StrIPos Stripos stripos().
StripSlashes Stripslashes stripslashes().
StrLen Strlen strlen().
StrPad 填充字符串.
StrPos Strpos strpos().
StrRepeat str_repeat().
StrReplace str_replace().
StrRev Strrev strrev().
StrRIPos Strripos strripos().
StrRPos Strrpos strrpos().
StrShuffle str_shuffle().
StrStr Strstr strstr().
StrToLower Strtolower strtolower().
StrToTime StrToTime() StrToTime("02/01/2006 15:04:05", "02/01/2016 15:04:05") == 1451747045 StrToTime("3 04 PM", "8 41 PM") == -62167144740.
StrToUpper Strtoupper strtoupper().
StrTr Strtr strtr()
If the parameter length is 1, type is: map[string]string Strtr("baab", map[string]string{"ab": "01"}) will return "ba01" If the parameter length is 2, type is: string, string Strtr("baab", "ab", "01") will return "1001", a => 0; b => 1.
StrTrim 去除空格.
StrWordCount str_word_count().
SubStr Substr substr().
System system() returnVar, 0: succ; 1: fail Returns the last line of the command output on success, and "" on failure.
Tag 数据标签.
Ternary Ternary expression max := Ternary(a > b, a, b).(int).
Time time().
Timestamp 毫秒.
TimeZone GetTimeZone 获取时区.
Touch touch().
ToWeekDay ...
Trim trim().
UCfirst Ucfirst ucfirst().
UCWords Ucwords ucwords().
UnescapeString ...
Uniqid uniqid().
UnixTimeFormatDate ...
Unlink unlink().
Unpack unpack().
URLDecode urldecode().
URLEncode urlencode().
USleep Usleep usleep().
VerifyEmail 验证邮箱.
VerifyIPv4 判断是否是否 ipv4 地址.
VerifyIPv6 判断是否是 ipv6 地址.
VerifyPhone 验证电话号码是否正确.
VersionCompare version_compare() The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
WordWrap Wordwrap wordwrap().
ZhCharToFirstPinyin 将中文转换成小写字母.
ZhCharToPinyin 将中文转换成小写字母.
ZipOpen zip_open().