Utils: improve representation of int, float and null in stack trace parameters

This commit is contained in:
Dylan K. Taylor 2022-05-10 14:07:07 +01:00
parent 17b0e0be84
commit a216f4d089
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -443,6 +443,9 @@ final class Utils{
is_array($value) => "array[" . count($value) . "]",
is_string($value) => "string[" . strlen($value) . "] " . substr(Utils::printable($value), 0, $maxStringLength),
is_bool($value) => $value ? "true" : "false",
is_int($value) => "int " . $value,
is_float($value) => "float " . $value,
$value === null => "null",
default => gettype($value) . " " . Utils::printable((string) $value)
};
}