From:             pjoe444 at hotmail dot com
Operating system: 
PHP version:      5.2.0
PHP Bug Type:     Unknown/Other Function
Bug description:  Suggestion: SUBSTR_ADD Function 

Description:
------------
SUGGESTION to the PhP Group 
(I did not find any place for suggestions on the site:
the suggestion links seem to point here)

How about a  SUBSTR_ADD  function similar to substr_replace

substr_add (mixed string, string replacement, int start [, int length] )

example when handling time (in schedules etc)

$var=1245
$var= substr_add ($var, ':', 2);
                  $var value now 12:45

Yes-- you can split and add and rejoin strings, or probably use
preg_replace, but I am surprised that such a simple useful facility does
not seem to be available in PHP !  :-(          Thanks!  Peter Douglas

Reproduce code:
---------------
N/A

Expected result:
----------------
N/A


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

Reply via email to