From:             delilahblue at gmail dot com
Operating system: Gentoo Linux
PHP version:      5.2.6
PHP Bug Type:     Strings related
Bug description:  sscanf does not work with %b

Description:
------------
sscanf does not work with %b in the format string.
PHP 5.2.6-pl7-gentoo (cli) (built: Sep 27 2008 23:46:17)
Linux version 2.6.24-tuxonice-r9 (gcc version 4.1.2 (Gentoo 4.1.2)) #1 SMP
PREEMPT Fri Oct 3 11:58:28 CEST 2008

USE-flags: apache2 bcmath berkdb bzip2 cli crypt ctype curl gd gdbm hash
iconv ipv6 mysql mysqli ncurses nls pcre readline reflection session
sockets spell spl ssl truetype unicode xml zlib

other people on freenode#php have the same issue
for example with php-5.2.4-2ubuntu5.3 on
Linux dev 2.6.24-19-386 #1 Wed Aug 20 21:59:50 UTC 2008 i686 GNU/Linux

Reproduce code:
---------------
echo sscanf("01010101", "%b");

Expected result:
----------------
It should output "85".

Actual result:
--------------
Warning: sscanf(): Bad scan conversion character "b" in php shell code on
line 1
Call Stack:
 3740.1460     179568   1. {main}() php shell code:0
 3740.1460     179568   2. sscanf() php shell code:1

-- 
Edit bug report at http://bugs.php.net/?id=46385&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46385&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46385&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46385&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46385&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46385&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46385&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46385&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46385&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46385&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46385&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46385&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46385&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46385&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46385&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46385&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46385&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46385&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46385&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46385&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46385&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46385&r=mysqlcfg

Reply via email to