modulepackage
0.0.0-20201223143554-fe703416d3ff
Repository: https://github.com/icatgo/php.git
Documentation: pkg.go.dev
# README
php
php functions for Go
# Functions
Abs abs().
Addslashes addslashes().
Base64Decode base64_decode().
Base64Encode base64_encode().
BaseConvert base_convert().
Basename basename().
Bin2hex bin2hex().
Bindec bindec().
Ceil ceil().
Chmod chmod().
Chown chown().
Copy copy().
Date date() Date("2006-01-02", 1520131400).
Decbin decbin().
Dechex dechex().
Decoct decoct().
Delete delete().
Echo echo.
Explode explode().
Fclose fclose().
Fgetcsv fgetcsv().
FileExists file_exists().
php file_get_contents().
Filemtime filemtime().
php file_put_contents().
FileSize filesize().
Floor floor().
Getcwd getcwd().
Gethostbyaddr gethostbyaddr() Get the Internet host name corresponding to a given IP address.
Gethostbyname gethostbyname() Get the IPv4 address corresponding to a given Internet host name.
Gethostbynamel gethostbynamel() Get a list of IPv4 addresses corresponding to a given Internet host name.
Gethostname gethostname().
Glob glob().
Hex2bin hex2bin().
Hexdec hexdec().
Htmlentities htmlentities().
HTMLEntityDecode html_entity_decode().
No description provided by the author
No description provided by the author
HTTPBuildQuery http_build_query().
Implode implode().
IP2long ip2long() IPv4.
IsDir is_dir().
IsFile is_file().
IsNan is_nan().
IsReadable is_readable().
IsWriteable is_writeable().
Join join() Join array elements with a string.
Lcfirst lcfirst().
Long2ip long2ip() IPv4.
Max max().
Md5 md5().
Md5File md5_file().
Min min().
Mkdir mkdir().
Octdec Octdec().
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().
Quotemeta quotemeta().
Rand rand() Range: [0, 2147483647].
Rawurldecode rawurldecode().
Rawurlencode rawurlencode().
Realpath realpath().
Rename rename().
Round round().
Sha1 sha1().
Sha1File sha1_file().
Sleep sleep().
Stat stat().
Stripos stripos().
Stripslashes stripslashes().
Strpos strpos().
StrReplace str_replace().
Strripos strripos().
Strrpos strrpos().
Strtolower strtolower().
Strtoupper strtoupper().
Time time().
Touch touch().
Ucfirst ucfirst().
Ucwords ucwords().
Uniqid uniqid().
php unlink().
URLDecode urldecode().
URLEncode urlencode().
Usleep usleep().
# Variables
Empty empty().
Exec exec() returnVar, 0: succ; 1: fail Return the last line from the result of the command.
IsNumeric is_numeric() Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part.
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.
Passthru passthru() returnVar, 0: succ; 1: fail.
System system() returnVar, 0: succ; 1: fail Returns the last line of the command output on success, and "" on failure.