mirror of
https://github.com/php/php-src.git
synced 2026-04-27 18:23:26 +02:00
b6958bb847
RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
20 lines
461 B
PHP
20 lines
461 B
PHP
--TEST--
|
|
Bug #23894 (sprintf() decimal specifiers problem) 64bit version
|
|
--SKIPIF--
|
|
<?php
|
|
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$a = -12.3456;
|
|
$test = sprintf("%04d", $a);
|
|
var_dump($test, bin2hex($test));
|
|
$test = sprintf("% 13u", $a);
|
|
var_dump($test, bin2hex($test));
|
|
?>
|
|
--EXPECT--
|
|
string(4) "-012"
|
|
string(8) "2d303132"
|
|
string(20) "18446744073709551604"
|
|
string(40) "3138343436373434303733373039353531363034"
|