mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fix sprintf_rope_optimization_004.phpt for 32-bit versions
see 2c5ed50d5c
This commit is contained in:
parent
2c5ed50d5c
commit
9907389007
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user