From: j dot stutterheim at hccnet dot nl Operating system: OS X 10.5.4 PHP version: 6CVS-2008-08-23 (CVS) PHP Bug Type: Feature/Change Request Bug description: Implement a string class
Description: ------------ Adding a string class to PHP would be greatly appreciated. It would allow for direct operations on a string: <?php $helloWorld = 'Hello World'; // Assign string 'Hello' to $hello $hello = $helloWorld->subString(0, 5); ?> Of course it would support a whole lot more string operations. See C# or Java as reference for example. It should also be compatible with the current string functions. PHP 6 would be a nice target for this feature. If for some reason it's not possible to combine this with the current approach, consider looking at Objective-C's solution. It requires an @ to be appended before the string, so it becomes a NSString instead of a regular C string. -- Edit bug report at http://bugs.php.net/?id=45898&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45898&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45898&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45898&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45898&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45898&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45898&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45898&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45898&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45898&r=support Expected behavior: http://bugs.php.net/fix.php?id=45898&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45898&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45898&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45898&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45898&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45898&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45898&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45898&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45898&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45898&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45898&r=mysqlcfg