From ed88396a8d72c108016c22b9f698afcfc4bcd402 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 16 Jun 2024 13:18:11 +0200 Subject: [PATCH] Remove unnecessary sprintf() in hot path --- src/Exporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exporter.php b/src/Exporter.php index bc023b5..19368ab 100644 --- a/src/Exporter.php +++ b/src/Exporter.php @@ -81,7 +81,7 @@ public function shortenedRecursiveExport(array &$data, ?RecursionContext $proces if ($processed->contains($data[$key]) !== false) { $result[] = '*RECURSION*'; } else { - $result[] = sprintf('[%s]', $this->shortenedRecursiveExport($data[$key], $processed)); + $result[] = '['. $this->shortenedRecursiveExport($data[$key], $processed) .']'; } } else { $result[] = $this->shortenedExport($value);