Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LessValue ¶
lessValue compares two reflect.Value instances and returns true if a is considered to be less than b.
This function is used to sort keys for what amounts to associate arrays and objects in PHP. These are represented as slices and maps in Go. Since Go randomised map iterators we need to make sure we always return the keys of an associative array or object in a predicable order.
The keys can be numerical, strings or a combination of both. We treat numbers (integers, unsigned integers and floats) as always less than strings. Numbers are ordered by magnitude (ignoring types) and strings are orders lexicographically.
If keys are of any other type the behavior of the comparison is undefined. If there is a legitimate reason why keys could be other types then this function should be updated accordingly.
func LowerCaseFirstLetter ¶
func NumericalToString ¶
func NumericalValue ¶
numericalValue returns the float64 representation of a value if it is a numerical type - integer, unsigned integer or float. If the value is not a numerical type then the second argument is false and the value returned should be disregarded.
Types ¶
This section is empty.