From 9907389007d7e99e67de93d2fa7b56f83e440796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 17 Jun 2024 17:45:23 +0200 Subject: [PATCH] Fix sprintf_rope_optimization_004.phpt for 32-bit versions see 2c5ed50d5c3efdbd2f24110911bc142866e4eca4 --- .../tests/strings/sprintf_rope_optimization_004.phpt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/standard/tests/strings/sprintf_rope_optimization_004.phpt b/ext/standard/tests/strings/sprintf_rope_optimization_004.phpt index a1c937aeb2c..27837e518a7 100644 --- a/ext/standard/tests/strings/sprintf_rope_optimization_004.phpt +++ b/ext/standard/tests/strings/sprintf_rope_optimization_004.phpt @@ -10,12 +10,19 @@ $b = new GMP("-1337"); $c = new GMP("999999999999999999999999999999999"); try { - var_dump(sprintf("%d/%d/%d/%s", $a, $b, $c, $c + 1)); + if (PHP_INT_SIZE == 8) { + var_dump(sprintf("%d/%d/%d/%s", $a, $b, $c, $c + 1)); + var_dump("42/-1337/2147483647/1000000000000000000000000000000000"); + } else { + var_dump("42/-1337/4089650035136921599/1000000000000000000000000000000000"); + var_dump(sprintf("%d/%d/%d/%s", $a, $b, $c, $c + 1)); + } } catch (\Throwable $e) {echo $e, PHP_EOL; } echo PHP_EOL; echo "Done"; ?> --EXPECTF-- string(63) "42/-1337/4089650035136921599/1000000000000000000000000000000000" +string(54) "42/-1337/2147483647/1000000000000000000000000000000000" Done