Documentation ¶
Index ¶
- Constants
- func Abs(arg float64) float64
- func Acos(arg float64) float64
- func Acosh(arg float64) float64
- func Addslashes(s string) string
- func Array(v ...interface{}) []interface{}
- func ArrayCountValues(v []interface{}) map[interface{}]uint
- func ArrayFlip(v map[interface{}]interface{}) map[interface{}]interface{}
- func ArrayKeys(v map[string]interface{}) []string
- func ArrayMerge(v ...[]interface{}) []interface{}
- func ArrayPush(v *[]interface{}, data ...interface{})
- func ArrayReverse(v []interface{}) []interface{}
- func ArrayValues(v ...[]interface{}) (value []interface{})
- func Asin(arg float64) float64
- func Asinh(arg float64) float64
- func Atan(arg float64) float64
- func Atan2(arg float64, arg2 float64) float64
- func Atanh(arg float64) float64
- func Base64Decode(v string) (string, error)
- func Base64Encode(v string) string
- func BaseConvert(arg string, frombase, tobase int) (string, error)
- func Basename(path string) string
- func Bin2Hex(s string) string
- func ByteCountIEC(b uint64) string
- func Ceil(arg float64) float64
- func Chgrp(name string, uid, gid int) error
- func Chmod(name string, mode os.FileMode) error
- func Chown(name string, uid int, gid int) error
- func Copy(src, dst string) (int64, error)
- func Cos(arg float64) float64
- func Cosh(arg float64) float64
- func Count(v []interface{}) int
- func DecBin(arg int64) string
- func DecHex(arg int64) string
- func DecOct(arg int64) string
- func Deg2Rad(arg float64) float64
- func Delete(name string) error
- func Die(of int)
- func DirName(path string) ([]os.FileInfo, error)
- func Echo(vars ...interface{})
- func Escapeshellarg(s string) string
- func Escapeshellcmd(s string) string
- func Exec(of string) string
- func Exit(of int)
- func Exp(arg float64) float64
- func ExpM1(arg float64) float64
- func Explode(s, set string) []string
- func FClose(file *os.File) error
- func FMod(arg float64, arg2 float64) float64
- func FOpen(file string, mode int) (*os.File, error)
- func FPuts(f *os.File, data string) int
- func FRead(f *os.File, sb int64) string
- func FWrite(f *os.File, data string) int
- func FileExists(path string) bool
- func FileGetContents(path string, includePath bool, context []string, offset int, maxlen int) string
- func FileMime(file string) time.Time
- func FilePerms(path string) os.FileMode
- func FilePutContents(path, data string)
- func FileSize(path string) (int64, error)
- func FileType(fs string) (string, error)
- func Floor(arg float64) float64
- func Glob(path string) (matches []string, err error)
- func Hash(cryp, val string) string
- func Hex2Bin(s string) string
- func HexDec(arg string) int64
- func HtmlspecialChars(s string) string
- func HtmlspecialCharsdecode(s string) string
- func HyPot(arg, arg2 float64) float64
- func Implode(sep string, v []string) string
- func InArray(needle interface{}, haystack interface{}) bool
- func IntDiv(arg, arg2 int64) (quotient int64)
- func IsArray(v interface{}) bool
- func IsDir(path string) bool
- func IsExecutable(path string) bool
- func IsFile(path string) bool
- func IsFinite(arg float64, ch int) bool
- func IsInFinite(arg float64, ch int) bool
- func IsLink(path string) bool
- func IsNan(arg float64) bool
- func IsReadable(path string) bool
- func IsURL(str string) bool
- func IsWritable(path string) bool
- func IsWriteable(path string) bool
- func Join(set string, s []string) string
- func LcgValue() float64
- func Link(target, link string)
- func Log(arg float64) float64
- func Log10(arg float64) float64
- func Log1P(arg float64) float64
- func Ltrim(s, set string) string
- func MD5(v string) string
- func MD5File(v string) string
- func Max(arg, arg2 float64) float64
- func MbStrtolower(s string) string
- func MbStrtoupper(s string) string
- func Min(arg, arg2 float64) float64
- func MkDir(path string, mode os.FileMode) error
- func Nl2br(s string) string
- func Now() int64
- func OctDec(arg string) int64
- func Pi() float64
- func Pow(arg, arg2 float64) float64
- func Print(vars string)
- func PrintR(vars ...interface{})
- func Rad2Deg(arg float64) float64
- func Rand(args ...int) int
- func ReadLink(path string) (string, error)
- func RealPath(path string) (string, error)
- func Rename(oldpath, newpath string) error
- func RmDir(path string) error
- func Round(arg float64) float64
- func Rtrim(s, set string) string
- func Sha1(v string) string
- func Sha1File(v string) string
- func Sha224(v string) string
- func Sha256(v string) string
- func Sha384(v string) string
- func Sha512(v string) string
- func ShellExec(of string) string
- func Sin(arg float64) float64
- func Sinh(arg float64) float64
- func Sizeof(v []interface{}) int
- func Sleep(t int64)
- func Sort(v interface{}, flag string) bool
- func Sqrt(arg float64) float64
- func Stat(name string) (os.FileInfo, error)
- func StrRepeat(s string, count int) string
- func StrReplace(find, replace, s string, n int) string
- func StringWithCharset(length int, charset string) string
- func Strtolower(s string) string
- func Strtoupper(s string) string
- func SymLink(target, link string)
- func Tan(arg float64) float64
- func Tanh(arg float64) float64
- func Tempfile() (f *os.File)
- func Tempnam(dir, prefix string) string
- func Time() int64
- func Touch(path string, t int64, at int64) bool
- func Trim(s, set string) string
- func USleep(t int64)
- func Unlink(name string) error
- type ArraySlice
- type DiskStatus
Constants ¶
const ( IP string = `` /* 659-byte string literal not displayed */ URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` URLUsername string = `(\S+(:\S*)?@)` URLPath string = `((\/|\?|#)[^\s]*)` URLPort string = `(:(\d{1,5}))` URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` URL = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` )
Basic regular expressions for validating strings
const Degree180 float64 = 180
Degree180 for Deg2Rad & Rad2Deg
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
Abs - Absolute value.
Original : https://www.php.net/manual/en/function.abs.php
Returns the absolute value of number.
func Acos ¶
Acos - Arc cosine.
Original : https://www.php.net/manual/en/function.acos.php
Returns the arc cosine of arg in radians. acos() is the inverse function of cos(), which means that a==cos(acos(a)) for every value of a that is within acos()' range.
func Acosh ¶
Acosh - Inverse hyperbolic cosine.
Original : https://www.php.net/manual/en/function.acosh.php
Returns the inverse hyperbolic cosine of arg, i.e. the value whose hyperbolic cosine is arg.
func Addslashes ¶ added in v0.3.0
Addslashes - Quote string with slashes
Original : https://www.php.net/manual/en/function.addslashes.php
Returns a string with backslashes added before characters that need to be escaped.
func ArrayCountValues ¶
func ArrayCountValues(v []interface{}) map[interface{}]uint
ArrayCountValues - Counts all the values of an array
Original : https://www.php.net/manual/en/function.array-count-values.php
func ArrayFlip ¶
func ArrayFlip(v map[interface{}]interface{}) map[interface{}]interface{}
ArrayFlip - Exchanges all keys with their associated values in an array
Original : https://www.php.net/manual/en/function.array-flip.php
ArrayFlip returns an array in flip order, i.e. keys from array become values and values from array become keys.
func ArrayKeys ¶
ArrayKeys - Return all the keys or a subset of the keys of an array
Original : https://www.php.net/manual/en/function.array-keys.php
func ArrayMerge ¶
func ArrayMerge(v ...[]interface{}) []interface{}
ArrayMerge - Merge one or more arrays
Original : https://www.php.net/manual/en/function.array-merge.php
func ArrayPush ¶
func ArrayPush(v *[]interface{}, data ...interface{})
ArrayPush - Push one or more elements onto the end of array
Original : https://www.php.net/manual/en/function.array-push.php
func ArrayReverse ¶
func ArrayReverse(v []interface{}) []interface{}
ArrayReverse - Return an array with elements in reverse order
Original : https://www.php.net/manual/en/function.array-reverse.php
func ArrayValues ¶
func ArrayValues(v ...[]interface{}) (value []interface{})
ArrayValues - Return all the values of an array
Original : https://www.php.net/manual/en/function.array-values.php
func Asin ¶
Asin - Arc sine.
Original : https://www.php.net/manual/en/function.asin.php
Returns the arc sine of arg in radians. asin() is the inverse function of sin(), which means that a==sin(asin(a)) for every value of a that is within asin()'s range.
func Asinh ¶
Asinh - Inverse hyperbolic sine.
Original : https://www.php.net/manual/en/function.asinh.php
Returns the inverse hyperbolic sine of arg, i.e. the value whose hyperbolic sine is arg.
func Atan ¶
Atan - Arc tangent.
Original : https://www.php.net/manual/en/function.atan.php
Returns the arc tangent of arg in radians. atan() is the inverse function of tan(), which means that a==tan(atan(a)) for every value of a that is within atan()'s range.
func Atan2 ¶
Atan2 - Arc tangent of two variables.
Original : https://www.php.net/manual/en/function.atan2.php
This function calculates the arc tangent of the two variables x and y. It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result.
The function returns the result in radians, which is between -PI and PI (inclusive).
func Atanh ¶
Atanh - Inverse hyperbolic tangent.
Original : https://www.php.net/manual/en/function.atanh.php
Returns the inverse hyperbolic tangent of arg, i.e. the value whose hyperbolic tangent is arg.
func Base64Decode ¶
Base64Decode - Decodes data encoded with MIME base64.
Original : https://www.php.net/manual/en/function.base64-decode.php
Decodes a base64 encoded data.
func Base64Encode ¶
Base64Encode - Encodes data with MIME base64.
Original : https://www.php.net/manual/en/function.base64-encode.php
Encodes given data with base64.
func BaseConvert ¶
BaseConvert - Convert a number between arbitrary bases.
Original : https://www.php.net/manual/en/function.base-convert.php
Returns a string containing number represented in base tobase. The base in which number is given is specified in frombase. Both frombase and tobase have to be between 2 and 36, inclusive. Digits in numbers with a base higher than 10 will be represented with the letters a-z, with a meaning 10, b meaning 11 and z meaning 35. The case of the letters doesn't matter, i.e. number is interpreted case-insensitively.
func Basename ¶
Basename - Returns trailing name component of path.
Original : https://www.php.net/manual/en/function.basename.php
Given a string containing the path to a file or directory, this function will return the trailing name component.
func Bin2Hex ¶ added in v0.3.1
Bin2Hex - Convert binary data into hexadecimal representation
Original : https://www.php.net/manual/en/function.bin2hex.php
Returns an ASCII string containing the hexadecimal representation of str. The conversion is done byte-wise with the high-nibble first.
func Ceil ¶
Ceil - Round fractions up.
Original : https://www.php.net/manual/en/function.ceil.php
Returns the next highest integer value by rounding up value if necessary.
func Chgrp ¶
Chgrp - Changes file group.
Original : https://www.php.net/manual/en/function.chgrp.php
Attempts to change the group of the file filename to group.
Only the superuser may change the group of a file arbitrarily; other users may change the group of a file to any group of which that user is a member.
func Chmod ¶
Chmod - Changes file mode
Original : https://www.php.net/manual/en/function.chmod.php
Attempts to change the mode of the specified file to that given in mode.
func Chown ¶
Chown - Changes file owner.
Original : https://www.php.net/manual/en/function.chown.php
Attempts to change the owner of the file filename to user user. Only the superuser may change the owner of a file.
func Copy ¶
Copy - Copies file
Original : https://www.php.net/manual/en/function.copy.php
Makes a copy of the file source to dest.
func Cos ¶
Cos - Cosine.
Original : https://www.php.net/manual/en/function.cos.php
cos() returns the cosine of the arg parameter. The arg parameter is in radians.
func Cosh ¶
Cosh - Hyperbolic cosine.
Original : https://www.php.net/manual/en/function.cosh.php
Returns the hyperbolic cosine of arg, defined as (exp(arg) + exp(-arg))/2.
func Count ¶
func Count(v []interface{}) int
Count - Count all elements in an array, or something in an object
func DecBin ¶
DecBin - Hyperbolic cosine.
Original : https://www.php.net/manual/en/function.decbin.php
Returns a string containing a binary representation of the given number argument.
func DecHex ¶
DecHex - Decimal to hexadecimal.
Original : https://www.php.net/manual/en/function.dechex.php
Returns a string containing a hexadecimal representation of the given unsigned number argument.
The largest number that can be converted is PHP_INT_MAX * 2 + 1 (or -1): on 32-bit platforms, this will be 4294967295 in decimal, which results in dechex() returning ffffffff.
func DecOct ¶
DecOct - Decimal to Octal
Original : https://www.php.net/manual/en/function.decoct.php
Returns a string containing an octal representation of the given number argument. The largest number that can be converted depends on the platform in use. For 32-bit platforms this is usually 4294967295 in decimal resulting in 37777777777. For 64-bit platforms this is usually 9223372036854775807 in decimal resulting in 777777777777777777777.
func Deg2Rad ¶
Deg2Rad - Converts the number in degrees to the radian equivalent.
Original : https://www.php.net/manual/en/function.deg2rad.php
This function converts number from degrees to the radian equivalent.
Degree180 is constant and value is 180 :)
func Delete ¶
Delete - Deletes a file.
Original : https://www.php.net/manual/en/function.delete.php
Deletes filename. Similar to the Unix C unlink() function. An E_WARNING level error will be generated on failure.
func Die ¶ added in v0.3.1
func Die(of int)
Die - Equivalent to exit
Original : https://www.php.net/manual/en/function.die.php
This language construct is equivalent to exit().
func DirName ¶
DirName - Returns a parent directory's path
Original : https://www.php.net/manual/en/function.dirname.php
Given a string containing the path of a file or directory, this function will return the parent directory's path that is levels up from the current directory.
func Escapeshellarg ¶ added in v0.3.4
Escapeshellarg - Escape a string to be used as a shell argument
Original: https://www.php.net/manual/en/function.escapeshellarg.php
func Escapeshellcmd ¶ added in v0.3.4
Escapeshellcmd - Escape shell metacharacters
Original: https://www.php.net/manual/en/function.escapeshellcmd.php
func Exec ¶
Exec - Start a command on system
Original : https://www.php.net/manual/tr/function.exec.php
exec() executes the given command.
func Exit ¶ added in v0.3.1
func Exit(of int)
Exit - Output a message and terminate the current script
Original : https://www.php.net/manual/en/function.exit.php
Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.
func Exp ¶
Exp - Calculates the exponent of e.
Original : https://www.php.net/manual/en/function.exp.php
Returns e raised to the power of arg.
Note : 'e' is the base of the natural system of logarithms, or approximately 2.718282.
func ExpM1 ¶
ExpM1 - Returns exp(number) - 1, computed in a way that is accurate even when the value of number is close to zero
Original : https://www.php.net/manual/en/function.expm1.php
expm1() returns the equivalent to 'exp(arg) - 1' computed in a way that is accurate even if the value of arg is near zero, a case where 'exp (arg) - 1' would be inaccurate due to subtraction of two numbers that are nearly equal.
func Explode ¶ added in v0.3.0
Explode - Split a string by a string
Original : https://www.php.net/manual/en/function.explode.php
Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter.
func FClose ¶
FClose - Closes an open file pointer
Original : https://www.php.net/manual/en/function.fclose.php
The file pointed to by handle is closed.
func FMod ¶
FMod - Returns the floating point remainder (modulo) of the division of the arguments
Original : https://www.php.net/manual/en/function.fmod.php
Returns the floating point remainder of dividing the dividend (x) by the divisor (y). The remainder (r) is defined as: x = i * y + r, for some integer i. If y is non-zero, r has the same sign as x and a magnitude less than the magnitude of y.
TO-DO : There is a problem with 0.2 like numbers. Will fix
func FOpen ¶
FOpen - Opens file
Original : https://www.php.net/manual/en/function.fopen.php
fopen() binds a named resource, specified by filename, to a stream.
Mode : os.O_RDONLY | os.O_WRONLY | os.O_RDWR | os.O_APPEND | os.O_CREATE | os.O_EXCL | os.O_SYNC | os.O_TRUNC
func FPuts ¶ added in v0.3.0
FPuts - Alias of FWrite
Original : https://www.php.net/manual/en/function.fputs.php
This function is an alias of: FWrite()..
func FRead ¶
FRead - Binary-safe file read.
Original : https://www.php.net/manual/en/function.fread.php
fread() reads up to length bytes from the file pointer referenced by handle.
func FWrite ¶ added in v0.3.0
FWrite - Binary-safe file write
Original : https://www.php.net/manual/en/function.fwrite.php
fwrite() writes the contents of string to the file stream pointed to by handle.
func FileExists ¶
FileExists - Checks whether a file or directory exists.
Original : https://www.php.net/manual/en/function.file-exists.php
Checks whether a file or directory exists.
func FileGetContents ¶
func FileGetContents(path string, includePath bool, context []string, offset int, maxlen int) string
FileGetContents - Reads entire file into a string.
Original : https://www.php.net/manual/en/function.file-get-contents.php
This function is similar to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE. TODO : Context Implementation.
func FileMime ¶
FileMime - Gets file modification time
Original : https://www.php.net/manual/en/function.filemtime.php
This function returns the time when the data blocks of a file were being written to, that is, the time when the content of the file was changed.
func FilePerms ¶
FilePerms - Gets file permissions.
Original : https://www.php.net/manual/en/function.fileperms.php Gets permissions for the given file.
func FilePutContents ¶ added in v0.3.0
func FilePutContents(path, data string)
FilePutContents - Write data to a file
Original : https://www.php.net/manual/en/function.file-put-contents.php
This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. TODO: Flags
func FileSize ¶
FileSize - Gets file permissions.
Original : https://www.php.net/manual/en/function.filesize.php Gets permissions for the given file.
func FileType ¶
FileType - Gets file type.
Original : https://www.php.net/manual/en/function.filetype.php
Returns the type of the given file.
func Floor ¶
Floor - Round fractions down
Original : https://www.php.net/manual/en/function.floor.php
Returns the next lowest integer value (as float) by rounding down value if necessary.
func Glob ¶
Glob - Find pathnames matching a pattern.
Original : https://www.php.net/manual/en/function.glob.php
The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells.
func Hex2Bin ¶ added in v0.3.1
Hex2Bin - Decodes a hexadecimally encoded binary string
Original : https://www.php.net/manual/en/function.hex2bin.php
Decodes a hexadecimally encoded binary string.
NOTE: This function does NOT convert a hexadecimal number to a binary number. This can be done using the BaseConvert() function.
func HexDec ¶
HexDec - Hexadecimal to decimal
Original : https://www.php.net/manual/en/function.hexdec.php
Returns the decimal equivalent of the hexadecimal number represented by the hex_string argument. hexdec() converts a hexadecimal string to a decimal number.
hexdec() will ignore any non-hexadecimal characters it encounters. As of PHP 7.4.0 supplying any invalid characters is deprecated.
func HtmlspecialChars ¶ added in v0.3.1
HtmlspecialChars - Convert special characters to HTML entities.
Original : https://www.php.net/manual/en/function.htmlspecialchars.php
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function returns a string with these conversions made
func HtmlspecialCharsdecode ¶ added in v0.3.1
HtmlspecialCharsdecode - Convert special HTML entities back to characters.
Original : https://www.php.net/manual/en/function.htmlspecialchars-decode.php
Convert special HTML entities back to characters.
func HyPot ¶
HyPot - Calculate the length of the hypotenuse of a right-angle triangle.
Original : https://www.php.net/manual/en/function.hypot.php
hypot() returns the length of the hypotenuse of a right-angle triangle with sides of length x and y, or the distance of the point (x, y) from the origin. This is equivalent to sqrt(x*x + y*y).
func Implode ¶
Implode - Join array elements with a string.
Original : https://www.php.net/manual/en/function.implode.php
Join array elements with a glue string.
func InArray ¶
func InArray(needle interface{}, haystack interface{}) bool
InArray - Similar function of in_array in PHP
Original : https://www.php.net/manual/en/function.in-array.php
needle : string, int haystack : should be an array strict : set true for type check return boolean true / false
func IntDiv ¶
IntDiv - Integer division.
Original : https://www.php.net/manual/en/function.intdiv.php
Returns the integer quotient of the division of dividend by divisor.
func IsArray ¶
func IsArray(v interface{}) bool
IsArray - Finds whether a variable is an array.
Original : https://www.php.net/manual/en/function.is-array.php
Finds whether the given variable is an array.
func IsDir ¶
IsDir - Tells whether the filename is a directory.
Original : https://www.php.net/manual/en/function.is-dir.php
Tells whether the given filename is a directory.
func IsExecutable ¶ added in v0.3.0
IsExecutable - Tells whether the filename is executable
Original : https://www.php.net/manual/en/function.is-executable.php
Tells whether the filename is executable.
func IsFile ¶
IsFile - Tells whether the filename is a regular file.
Original : https://www.php.net/manual/en/function.is-file.php
Tells whether the given file is a regular file.
func IsFinite ¶
IsFinite - Finds whether a value is a legal finite number.
Original : https://www.php.net/manual/en/function.is-finite.php
Checks whether val is a legal finite on this platform.
func IsInFinite ¶
IsInFinite - Finds whether a value is infinite.
Original : https://www.php.net/manual/en/function.is-infinite.php
Returns TRUE if val is infinite (positive or negative), like the result of log(0) or any value too big to fit into a float on this platform.
func IsLink ¶
IsLink - Tells whether the filename is a symbolic link.
Original : https://www.php.net/manual/en/function.is-link.php
Tells whether the given file is a symbolic link.
func IsNan ¶
IsNan - Finds whether a value is infinite.
Original : https://www.php.net/manual/en/function.is-infinite.php
Returns TRUE if val is infinite (positive or negative), like the result of log(0) or any value too big to fit into a float on this platform.
func IsReadable ¶
IsReadable - Tells whether a file exists and is readable.
Original : https://www.php.net/manual/en/function.is-readable.php
Tells whether a file exists and is readable.
func IsWritable ¶
IsWritable - Tells whether the filename is writable.
Original : https://www.php.net/manual/en/function.is-writable.php
Returns TRUE if the filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writable.
func IsWriteable ¶
IsWriteable - Tells whether the filename is writable.
Original : https://www.php.net/manual/en/function.is-writeable.php
Returns TRUE if the filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writable.
func Join ¶ added in v0.3.0
Join - Alias o Implode
Original : https://www.php.net/manual/en/function.join.php
Alias o Implode
func LcgValue ¶
func LcgValue() float64
LcgValue - Combined linear congruential generator
Original : https://www.php.net/manual/en/function.lcg-value.php
lcg_value() returns a pseudo random number in the range of (0, 1). The function combines two CGs with periods of 2^31 - 85 and 2^31 - 249. The period of this function is equal to the product of both primes.
func Link ¶ added in v0.3.0
func Link(target, link string)
Link - Create a hard link
Original : https://www.php.net/manual/en/function.link.php
link() creates a hard link.
func Log ¶
Log - Natural logarithm
Original : https://www.php.net/manual/en/function.log.php
If the optional base parameter is specified, log() returns logbase arg, otherwise log() returns the natural logarithm of arg.
func Log10 ¶
Log10 - Base-10 logarithm
Original : https://www.php.net/manual/en/function.log10.php
Returns the base-10 logarithm of arg.
func Log1P ¶
Log1P - Returns log(1 + number), computed in a way that is accurate even when the value of number is close to zero.
Original : https://www.php.net/manual/en/function.log1p.php
log1p() returns log(1 + number) computed in a way that is accurate even when the value of number is close to zero. log() might only return log(1) in this case due to lack of precision.
func Ltrim ¶ added in v0.3.0
Ltrim - Strip whitespace (or other characters) from the beginning of a string
Original : https://www.php.net/manual/en/function.ltrim.php
Strip whitespace (or other characters) from the beginning of a string.
func MD5 ¶
MD5 - Calculate the md5 hash of a string.
Original : https://www.php.net/manual/en/function.md5.php
Calculates the MD5 hash of str using the RSA Data Security, Inc. MD5 Message-Digest Algorithm.
func MD5File ¶
MD5File - Calculates the md5 hash of a given file.
Original : https://www.php.net/manual/en/function.md5-file.php
Calculates the MD5 hash of the file specified by the filename parameter using the RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. The hash is a 32-character hexadecimal number.
func Max ¶
Max - Find highest value.
Original : https://www.php.net/manual/en/function.max.php
If at least two parameters are provided, max() returns the biggest of these values.
func MbStrtolower ¶ added in v0.3.0
MbStrtolower - Make a string lowercase
Original : https://www.php.net/manual/en/function.mb-strtolower.php
Returns str with all alphabetic characters converted to lowercase.
func MbStrtoupper ¶ added in v0.3.0
MbStrtoupper - Make a string uppercase
Original : https://www.php.net/manual/en/function.mb-strtoupper.php
Returns str with all alphabetic characters converted to uppercase.
func Min ¶
Min - Find lowest value.
Original : https://www.php.net/manual/en/function.min.php
If at least two parameters are provided, min() returns the smallest of these values.
func MkDir ¶
MkDir - Makes directory.
Original : https://www.php.net/manual/en/function.mkdir.php
Attempts to create the directory specified by pathname.
func Nl2br ¶ added in v0.3.1
Nl2br - Inserts HTML line breaks before all newlines in a string
Original : https://www.php.net/manual/en/function.nl2br.php
Returns string with <br /> or <br> inserted before all newlines (\r\n, \n\r, \n and \r).
func Now ¶
func Now() int64
Now - Similar function of time() in PHP.
Original : https://www.php.net/manual/en/function.time.php
Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
func OctDec ¶
OctDec - Octal to decimal
Original : https://www.php.net/manual/en/function.octdec.php
Returns the decimal equivalent of the octal number represented by the octal_string argument.
func Pi ¶
func Pi() float64
Pi - Get value of pi
Original : https://www.php.net/manual/en/function.pi.php
Returns an approximation of pi.
func Pow ¶
Pow - Exponential expression
Original : https://www.php.net/manual/en/function.pow.php
Returns base raised to the power of exp.
func PrintR ¶
func PrintR(vars ...interface{})
PrintR - Prints human-readable information about a variable
Original : https://www.php.net/manual/en/function.print-r.php
func Rad2Deg ¶
Rad2Deg - Converts the radian number to the equivalent number in degrees.
Original : https://www.php.net/manual/en/function.rad2deg.php
This function converts number from radian to degrees. Degree180 is constant and value is 180 :)
func Rand ¶
Rand - Generate a random integer
Original : https://www.php.net/manual/en/function.rand.php
If you want a random number between 5 and 15 (inclusive), for example, use Rand(5, 15).
func ReadLink ¶
ReadLink - Returns the target of a symbolic link.
Original : https://www.php.net/manual/en/function.readlink.php
readlink() does the same as the readlink C function.
func RealPath ¶
RealPath - Returns canonicalized absolute pathname.
Original : https://www.php.net/manual/en/function.realpath.php
realpath() expands all symbolic links and resolves references to /./, /../ and extra / characters in the input path and returns the canonicalized absolute pathname.
func Rename ¶
Rename - Renames a file or directory.
Original : https://www.php.net/manual/en/function.rename.php
Attempts to rename oldname to newname, moving it between directories if necessary. If renaming a file and newname exists, it will be overwritten. If renaming a directory and newname exists, this function will emit a warning.
func RmDir ¶
RmDir — Removes directory.
Original : https://www.php.net/manual/en/function.rmdir.php
Attempts to remove the directory named by dirname. The directory must be empty, and the relevant permissions must permit this. A E_WARNING level error will be generated on failure.
func Round ¶
Round - Rounds a float
Original : https://www.php.net/manual/en/function.round.php
Returns the rounded value of val to specified precision (number of digits after the decimal point). precision can also be negative or zero (default).
func Rtrim ¶ added in v0.3.0
Rtrim - Strip whitespace (or other characters) from the end of a string
Original : https://www.php.net/manual/en/function.rtrim.php
This function returns a string with whitespace (or other characters) stripped from the end of str.
func Sha1 ¶
Sha1 - Calculate the sha1 hash of a string.
Original : https://www.php.net/manual/en/function.sha1.php
Calculates the sha1 hash of str using the US Secure Hash Algorithm 1.
func Sha1File ¶
Sha1File - Calculate the sha1 hash of a file.
Original : https://www.php.net/manual/en/function.sha1-file.php
Calculates the sha1 hash of the file specified by filename using the US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.
func ShellExec ¶
ShellExec - Execute command via shell and return the complete output as a string
Original : https://www.php.net/manual/en/function.shell-exec.php
This function is identical to the backtick operator.
func Sin ¶
Sin - Sine.
Original : https://www.php.net/manual/en/function.sin.php
sin() returns the sine of the arg parameter. The arg parameter is in radians.
func Sinh ¶
Sinh - Hyperbolic sine.
Original : https://www.php.net/manual/en/function.sinh.php
Returns the hyperbolic sine of arg, defined as (exp(arg) - exp(-arg))/2.
func Sizeof ¶ added in v0.2.4
func Sizeof(v []interface{}) int
Sizeof - Alias of Count
Original : https://www.php.net/manual/en/function.sizeof.php
func Sleep ¶
func Sleep(t int64)
Sleep - Delay in seconds
Original : https://www.php.net/manual/en/function.sleep.php
Delays the program execution for the given number of seconds.
func Sort ¶ added in v0.2.4
Sort - Sort an array
Original : https://www.php.net/manual/en/function.sort.php
This function sorts an array. Elements will be arranged from lowest to highest when this function has completed.
Flags are same as php sort.
SORT_REGULAR - compare items normally; SORT_NUMERIC - compare items numerically SORT_STRING - compare items as strings SORT_NATURAL - compare items as strings using "natural ordering" like natsort()
func Sqrt ¶
Sqrt - Square root.
Original : https://www.php.net/manual/en/function.sqrt.php
Returns the square root of arg.
func Stat ¶
Stat - Gives information about a file.
Original : https://www.php.net/manual/en/function.stat.php
Gathers the statistics of the file named by filename. If filename is a symbolic link, statistics are from the file itself, not the symlink. Prior to PHP 7.4.0, on Windows NTS builds the size, atime, mtime and ctime statistics have been from the symlink, in this case.
func StrRepeat ¶ added in v0.3.1
StrRepeat - Repeat a string
Original : https://www.php.net/manual/en/function.str-repeat.php
Returns string repeated times times.
func StrReplace ¶ added in v0.3.1
StrReplace - Replace all occurrences of the search string with the replacement string
Original : https://www.php.net/manual/en/function.str-replace.php
This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.
n value must set to -1 if you want to infinite change
func StringWithCharset ¶ added in v0.3.1
StringWithCharset - Create RAndom and Unique String
func Strtolower ¶ added in v0.3.0
Strtolower - Make a string lowercase
Original : https://www.php.net/manual/en/function.strtolower.php
Returns string with all alphabetic characters converted to lowercase.
func Strtoupper ¶ added in v0.3.0
Strtoupper - Make a string uppercase
Original : https://www.php.net/manual/en/function.strtoupper.php
Returns string with all alphabetic characters converted to uppercase.
func SymLink ¶ added in v0.3.0
func SymLink(target, link string)
SymLink - Creates a symbolic link
Original : https://www.php.net/manual/en/function.symlink.php
symlink() creates a symbolic link to the existing target with the specified name link.
func Tan ¶
Tan - Tangent.
Original : https://www.php.net/manual/en/function.tan.php
tan() returns the tangent of the arg parameter. The arg parameter is in radians.
func Tanh ¶
Tanh - Hyperbolic tangent.
Original : https://www.php.net/manual/en/function.tanh.php
Returns the hyperbolic tangent of arg, defined as sinh(arg)/cosh(arg).
func Tempfile ¶ added in v0.3.1
Tempfile - Creates a temporary file
Original : https://www.php.net/manual/en/function.tmpfile.php
Creates a temporary file with a unique name in read-write (w+) mode and returns a file handle.
The file is automatically removed when closed (for example, by calling fclose(), or when there are no remaining references to the file handle returned by tmpfile()), or when the script ends.
func Tempnam ¶ added in v0.3.1
Tempnam - Create file with unique file name
Original : https://www.php.net/manual/en/function.tempnam.php
Creates a file with a unique filename, with access permission set to 0600, in the specified directory. If the directory does not exist or is not writable, tempnam() may generate a file in the system's temporary directory, and return the full path to that file, including its name.
func Time ¶
func Time() int64
Time - Similar function of time() in PHP.
Original : https://www.php.net/manual/en/function.time.php
Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
func Touch ¶ added in v0.2.3
Touch - Sets access and modification time of file
Original : https://www.php.net/manual/en/function.touch.php
Attempts to set the access and modification times of the file named in the filename parameter to the value given in time. Note that the access time is always modified, regardless of the number of parameters. If the file does not exist, it will be created.
func Trim ¶ added in v0.3.0
Trim - Strip whitespace (or other characters) from the beginning and end of a string
Original : https://www.php.net/manual/en/function.trim.php
This function returns a string with whitespace stripped from the beginning and end of str.
func USleep ¶
func USleep(t int64)
USleep - Delay in microseconds
Original : https://www.php.net/manual/en/function.usleep.php
Delays program execution for the given number of microseconds.
func Unlink ¶
Unlink - Deletes a file.
Original : https://www.php.net/manual/en/function.unlink.php
Deletes filename. Similar to the Unix C unlink() function. An E_WARNING level error will be generated on failure.
Types ¶
type ArraySlice ¶
type ArraySlice []interface{}
ArraySlice type -- Required for ArrayChunk
func ArrayChunk ¶
func ArrayChunk(v ArraySlice, size int) ArraySlice
ArrayChunk - Split an array into chunks
Original : https://www.php.net/manual/en/function.array-chunk.php
type DiskStatus ¶
type DiskStatus struct {
Free string `json:"Free"`
}
DiskStatus struct
func DiskFreeSpace ¶
func DiskFreeSpace(path string) (disk DiskStatus)
DiskFreeSpace - Returns available space on filesystem or disk partition
Original : https://www.php.net/manual/en/function.disk-free-space.php
Given a string containing a directory, this function will return the number of bytes available on the corresponding filesystem or disk partition.
DEVELOPER NOTE : PROBABLY WORKING ON ONLY LINUX AND MAC. TO-DO : WINDOWS