From:             csongibacsi at nexum dot hu
Operating system: Linux video 2.4.18-bf2.4 #1 Son 
PHP version:      4.3.4
PHP Bug Type:     Feature/Change Request
Bug description:  docs for substr("", 0, 0) is not clear

Description:
------------
The real behaviour is different from the one which is described in the
docs. 

The docs says: "If string is less than start characters long, FALSE will
be returned." In the case of the parameters described below, the string
"abc" is not less than 3 characters long so it should NOT give back FALSE,
but it gives. 

Reproduce code:
---------------
  var_dump( substr( "abc", 3, 0 ) );


Expected result:
----------------
  string(0) "" 



Actual result:
--------------
  bool(false)


-- 
Edit bug report at http://bugs.php.net/?id=26916&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26916&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26916&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26916&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26916&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26916&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26916&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26916&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26916&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26916&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26916&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26916&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26916&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26916&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26916&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26916&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26916&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26916&r=float

Reply via email to