__toString(); } if (is_bool($value)) { return var_export($value, true); } return strval($value); } public static function getType($value): string { if (is_string($value)) { return "string"; } if (is_array($value)) { return "array"; } if (is_object($value)) { return "object (" . get_class($value) . ")"; } return gettype($value); } public static function toMilliSeconds(\DateTime $dateTime) { $secs = $dateTime->getTimestamp(); // Gets the seconds $millisecs = $secs * 1000; // Converted to milliseconds $millisecs += $dateTime->format("u") / 1000; // Microseconds converted to seconds return $millisecs; } public static function isObject($value): bool { return is_object($value); } }