Show Output
Format Integer Values Using sprintf()
", $num1); // Binary representation echo sprintf("%%c = %c
", $num3); // The ASCII Character echo sprintf("%%d = %d
", $num1); // Standard integer representation echo sprintf("%%d = %d
", $num2); // Standard integer representation echo sprintf("%%e = %e
", $num1); // Scientific notation (lowercase) echo sprintf("%%E = %E
", $num1); // Scientific notation (uppercase) echo sprintf("%%u = %u
", $num1); // Unsigned integer representation (positive) echo sprintf("%%u = %u
", $num2); // Unsigned integer representation (negative) echo sprintf("%%f = %f
", $num1); // Floating-point representation (locale aware) echo sprintf("%%F = %F
", $num1); // Floating-point representation (non-locale aware) echo sprintf("%%g = %g
", $num1); // Shorter of %e and %f echo sprintf("%%G = %G
", $num1); // Shorter of %E and %f echo sprintf("%%o = %o
", $num1); // Octal representation echo sprintf("%%s = %s
", $num1); // String representation echo sprintf("%%x = %x
", $num1); // Hexadecimal representation (lowercase) echo sprintf("%%X = %X
", $num1); // Hexadecimal representation (uppercase) echo sprintf("%%+d = %+d
", $num1); // Sign specifier (positive) echo sprintf("%%+d = %+d
", $num2); // Sign specifier (negative) ?>