--TEST-- Test printf() function (64bit) --SKIPIF-- 2147483647)) { die("skip 64bit test only"); } ?> --INI-- precision=14 --FILE-- --EXPECTF-- *** Output for zero argument *** Warning: printf() expects at least 1 parameter, 0 given in %s on line %d *** Output for insufficient number of arguments *** Warning: printf(): Too few arguments in %s on line %d *** Output for scalar argument *** 3 *** Output for NULL as argument *** *** Output for float type *** Input Float numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 0.32 [4] => -0.32 [5] => 3.4-3.4 [6] => 2.54 [7] => -2.54 [8] => 1.2345678E+99 [9] => -1.2345678E+99 ) Float Iteration 1 0.000000 1.000000 -1.000000 0.320000 -0.320000 3.400000 2.540000 -2.540000 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.000000 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.000000 Float Iteration 2 0.000000 1.000000 -1.000000 0.320000 -0.320000 3.400000 2.540000 -2.540000 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.000000 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.000000 Float Iteration 3 +0.000000 +1.000000 -1.000000 +0.320000 -0.320000 +3.400000 +2.540000 -2.540000 +1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.000000 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.000000 Float Iteration 4 0.00 1.00 -1.00 0.32 -0.32 3.40 2.54 -2.54 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 Float Iteration 5 0.00 1.00 -1.00 0.32 -0.32 3.40 2.54 -2.54 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 Float Iteration 6 0000.00 0001.00 -001.00 0000.32 -000.32 0003.40 0002.54 -002.54 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 Float Iteration 7 0.00000 1.00000 -1.0000 0.32000 -0.3200 3.40000 2.54000 -2.5400 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 Float Iteration 8 ###0.00 ###1.00 ##-1.00 ###0.32 ##-0.32 ###3.40 ###2.54 ##-2.54 1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 -1234567799999999974395005011934353453808157274826416694779123657996479008398428960266851879135215616.00 *** Output for integer type *** Input Integer numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 2.7 [4] => -2.7 [5] => 23333333 [6] => -23333333 [7] => 1234 ) Integer Iteration 1 0 1 -1 2 -2 23333333 -23333333 1234 Integer Iteration 2 0 1 -1 2 -2 23333333 -23333333 1234 Integer Iteration 3 +0 +1 -1 +2 -2 +23333333 -23333333 +1234 Integer Iteration 4 0 1 -1 2 -2 23333333 -23333333 1234 Integer Iteration 5 0 1 -1 2 -2 23333333 -23333333 1234 Integer Iteration 6 0000000 0000001 -000001 0000002 -000002 23333333 -23333333 0001234 Integer Iteration 7 0 1 -1 2 -2 23333333 -23333333 1234 Integer Iteration 8 ######0 ######1 #####-1 ######2 #####-2 23333333 -23333333 ###1234 *** Output for binary type *** Input numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 2.7 [4] => -2.7 [5] => 23333333 [6] => -23333333 [7] => 1234 ) 0 1 1111111111111111111111111111111111111111111111111111111111111111 10 1111111111111111111111111111111111111111111111111111111111111110 1011001000000100111010101 1111111111111111111111111111111111111110100110111111011000101011 10011010010 *** Output for char type *** Input Characters variation array is: Array ( [0] => a [1] => a [2] => 67 [3] => -67 [4] => 99 ) C ½ c *** Output for scientific type *** Input numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 2.7 [4] => -2.7 [5] => 23333333 [6] => -23333333 [7] => 1234 ) 0.000000e+0 1.000000e+0 -1.000000e+0 2.700000e+0 -2.700000e+0 2.333333e+7 -2.333333e+7 1.234000e+3 *** Output for unsigned integer type *** Input Integer numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 2.7 [4] => -2.7 [5] => 23333333 [6] => -23333333 [7] => 1234 ) 0 1 18446744073709551615 2 18446744073709551614 23333333 18446744073686218283 1234 *** Output for octal type *** Input numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 2.7 [4] => -2.7 [5] => 23333333 [6] => -23333333 [7] => 1234 ) 0 1 1777777777777777777777 2 1777777777777777777776 131004725 1777777777777646773053 2322 *** Output for hexadecimal type *** Input numbers variation array is: Array ( [0] => 0 [1] => 1 [2] => -1 [3] => 2.7 [4] => -2.7 [5] => 23333333 [6] => -23333333 [7] => 1234 ) 0 1 ffffffffffffffff 2 fffffffffffffffe 16409d5 fffffffffe9bf62b 4d2 *** Output for string type *** Input Strings format variation array is: Array ( [0] => %5s [1] => %-5s [2] => %05s [3] => %'#5s ) Input strings variation array is: Array ( [0] => [1] => abc [2] => aaa ) abc aaa abc aaa 00000 00abc 00aaa ##### ##abc ##aaa *** Output for '%g' type *** Input format variation array is: Array ( [0] => %g [1] => %.0g [2] => %+g [3] => %-g [4] => %-1.2g [5] => %+1.2g [6] => %G [7] => %.0G [8] => %+G [9] => %-G [10] => %-1.2G [11] => %+1.2G ) 123456 -123456 1.0e+5 -1.0e+5 +123456 -123456 123456 -123456 1.2e+5 -1.2e+5 +1.2e+5 -1.2e+5 123456 -123456 1.0E+5 -1.0E+5 +123456 -123456 123456 -123456 1.2E+5 -1.2E+5 +1.2E+5 -1.2E+5 *** Output for '%%%.2f' as the format parameter *** %12345678900.00 *** Output for '%%' as the format parameter *** % *** Output for precision value more than maximum *** Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum of %d digits in %s on line %d 12345678900.0000000000%d *** Output for invalid width(-15) specifier *** 15s *** Output for '%F' as the format parameter *** 12345678900.000000 *** Output for '%X' as the format parameter *** C *** Output with no format parameter *** 12345 *** Output for multiple format parameters *** 12345 abcdefghjklmnpqrstuvwxyz 12345 *** Output for excess of mixed type arguments *** abcdefghjklmnpqrstuvwxyz *** Output for string format parameter and integer type argument *** 12345 *** Output for integer format parameter and string type argument *** 0