Clips a string to a maximum length.
string
clipString
(string $value, integer $size, [integer $position = 0])
-
string
$value: String to truncate.
-
integer
$size: Minimum string size to show.
-
integer
$position: Centre of string section.
Creates a human readable description of the difference between two arrays.
string
describeArrayDifference
(array $first, mixed $second, boolean $identical)
-
array
$first: First array.
-
mixed
$second: Array to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a boolean and another variable.
string
describeBooleanDifference
(boolean $first, mixed $second, boolean $identical)
-
boolean
$first: First boolean.
-
mixed
$second: Boolean to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between two variables. Uses a dynamic call.
string
describeDifference
(mixed $first, mixed $second, [boolean $identical = false])
-
mixed
$first: First variable.
-
mixed
$second: Value to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between two floating point numbers.
string
describeFloatDifference
(float $first, mixed $second, boolean $identical)
-
float
$first: First float.
-
mixed
$second: Float to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between two variables. The minimal version.
string
describeGenericDifference
(null $first, mixed $second)
-
null
$first: First value.
-
mixed
$second: Value to compare with.
Creates a human readable description of the difference between an integer and another variable.
string
describeIntegerDifference
(integer $first, mixed $second, boolean $identical)
-
integer
$first: First number.
-
mixed
$second: Number to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a null and another variable.
string
describeNullDifference
(null $first, mixed $second, boolean $identical)
-
null
$first: First null.
-
mixed
$second: Null to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between two objects.
string
describeObjectDifference
(object $first, mixed $second, boolean $identical)
-
object
$first: First object.
-
mixed
$second: Object to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a resource and another variable.
string
describeResourceDifference
(resource $first, mixed $second, boolean $identical)
-
resource
$first: First resource.
-
mixed
$second: Resource to compare with.
-
boolean
$identical: If true then type anomolies count.
Creates a human readable description of the difference between a string and another variable.
string
describeStringDifference
(string $first, mixed $second, boolean $identical)
-
string
$first: First string.
-
mixed
$second: String to compare with.
-
boolean
$identical: If true then type anomolies count.
Renders a variable in a shorter form than print_r().
string
describeValue
(mixed $value)
-
mixed
$value: Variable to render as a string.
Sends a formatted dump of a variable to a string.
string
dump
(mixed $variable)
-
mixed
$variable: Variable to display.
Get all members of an object including private and protected ones.
A safer form of casting to an array.
array
getMembers
(object $object)
-
object
$object: Object to list members of, including private ones.
Gets the string representation of a type.
string
getType
(mixed $value)
-
mixed
$value: Variable to check against.
Compares two arrays to see if their key lists match.
For an identical match, the ordering and types of the keys is significant.
boolean
isMatchingKeys
(array $first, array $second, boolean $identical)
-
array
$first: First array.
-
array
$second: Array to compare with.
-
boolean
$identical: If true then type anomolies count.
Tests to see if types match.
boolean
isTypeMatch
(mixed $first, mixed $second)
-
mixed
$first: First variable.
-
mixed
$second: Value to compare with.
Find the first character position that differs in two strings by binary chop.
integer
stringDiffersAt
(string $first, string $second)
-
string
$first: First string.
-
string
$second: String to compare with.
Removes crud from property name after it's been converted to an array.
string
unmangle
(string $mangled)
-
string
$mangled: Name from array cast.