Bug #79904 [NEW]: printf() and sprintf() not proper formatted string.

From: Date: Tue, 28 Jul 2020 04:35:56 +0000
Subject: Bug #79904 [NEW]: printf() and sprintf() not proper formatted string.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228243@lists.php.net to get a copy of this message
From:             amit000790 at gmail dot com
Operating system: ubuntu LTS 20.04
PHP version:      7.4.8
Package:          Strings related
Bug Type:         Bug
Bug description:printf() and sprintf() not proper formatted string.

Description:
------------
- when I used % sign in a string, as a result after the first-word
letter skipped.

Test script:
---------------
printf(
    '12.5% tax price: %1$s',
    '1200'
);


Expected result:
----------------
12.5% tax price: 1200

Actual result:
--------------
12.5ax price: 1200

-- 
Edit bug report at https://bugs.php.net/bug.php?id=79904&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79904&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79904&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79904&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79904&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79904&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79904&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79904&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79904&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79904&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79904&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79904&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79904&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79904&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79904&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79904&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79904&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79904&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#228243) next »