php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #699 explode should not return a 1-element array for an empty string
Submitted: 1998-08-27 11:58 UTC Modified: 1999-06-12 16:16 UTC
From: daniele at orlandi dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.3 OS: RedHat Linux 5.1
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: daniele at orlandi dot com
New email:
PHP Version: OS:

 

 [1998-08-27 11:58 UTC] daniele at orlandi dot com
$a=explode("",":");
echo count($a);

Prints 1

IMHO, an empty string should explode to a 0-elements array.

Patches

Pull Requests

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jan 12 03:00:01 2026 UTC