ID: 8326
Updated by: david
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To: 

This is completely bogus and would break all existing scripts. The purpose of ucfirst 
is just to uppercase the first letter and make no other changes.

If you really want that, why not simply do ucfirst(strtolower($var)). Ditto ucwords.

Previous Comments:

[2000-12-19 22:09:01] [EMAIL PROTECTED]
Changed to a feature request.

The first letters are put into upper case, as per the function name and 
description.... an alternate function such as "title case" could be interesting, but
will also accomplish this.


[2000-12-19 21:07:33] [EMAIL PROTECTED]
A little correction:

Above bug report refers to ucwords(), however ucfirst() has exact same problem.  
ucfirst("HELLO WORLD") should return "Hello world".


[2000-12-19 20:55:02] [EMAIL PROTECTED]
Running ucfirst() on a string which is already all capitalized has no effect:

<?php print ucfirst("HELLO WORLD"); ?>
will print "HELLO WORLD".

The expected behavior here is probably to return "Hello World".


Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to