php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65666 Please reference alternatives to depricated split function
Submitted: 2013-09-13 15:04 UTC Modified: 2013-10-02 22:40 UTC
From: joe at joeceresini dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: N/A
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: joe at joeceresini dot com
New email:
PHP Version: OS:

 

 [2013-09-13 15:04 UTC] joe at joeceresini dot com
Description:
------------
---
From manual page: http://www.php.net/function.split#refsect1-function.split-description
---

In the notice below, please add alternatives such as explode and preg_split. I noticed a few posts on forums asking what alternatives are available for split from people that saw it was deprecated. Offering the alternatives on that page will provide a better user experience for those reading the documentation.

Notice from the split doc page:
"This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged."


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-13 15:20 UTC] gabri dot ns at gmail dot com
there is already offered alternative on [Ssee Also] section.
http://www.php.net/function.split#refsect1-function.split-seealso
 [2013-09-14 01:46 UTC] joe at joeceresini dot com
I see there is already a "see also" section, but as a developer, I'm not going to read past parameters, return values and examples to find alternatives. I could have sworn I've seen other deprecated functions with alternatives directly in the deprecation warning. If it were my decision, that's where I'd put them.
 [2013-09-16 12:17 UTC] cmbecker69 at gmx dot de
The notes[1] on the manual page are quite explicit about 
alternatives.  IMHO that is sufficient in addition to the 
prominent deprecation warning.

[1] <http://de3.php.net/function.split#refsect1-function.split-notes>
 [2013-10-02 20:07 UTC] krakjoe@php.net
-Status: Open +Status: Not a bug
 [2013-10-02 20:07 UTC] krakjoe@php.net
All we can do is put the documentation out there ... you have to read it.
 [2013-10-02 22:40 UTC] joe at joeceresini dot com
And I can only make suggestions that I think will benefit your community of users. Heres some of the functions that have alternatives in the deprecation warning or just above or below it:

http://www.php.net/manual/en/function.mysql-list-dbs.php
http://www.php.net/manual/en/function.mysql-escape-string.php
http://www.php.net/manual/en/function.mcrypt-ecb.php
http://www.php.net/manual/en/function.mcrypt-cbc.php

So consistency...

Also, if the first thing I read is "don't use this function", I'm not going to read much further.

The deprecation warning is, in my opinion, a great place to suggest alternatives. If you disagree that's fine, but its at least worth thinking about.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 10:00:01 2026 UTC