|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17517 ucwords() returns false when it should return ''
Submitted: 2002-05-29 20:08 UTC Modified: 2002-06-17 07:38 UTC
From: darren at flyingcolor dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 4.1.2 OS: Linux and NT4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: darren at flyingcolor dot com
New email:
PHP Version: OS:


 [2002-05-29 20:08 UTC] darren at flyingcolor dot com
ucwords('') returns a type of boolean but it should return ''. This script demonstrates the problem:

$s="a bc";
echo gettype($s2).":".$s2;
echo gettype($s2).":".$s2;

To get around it I do this after the ucwords() call:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-17 07:38 UTC]
fixed in CVS
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 01:01:29 2024 UTC