php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69119 Unconstancies in mysql_escape_string web page
Submitted: 2015-02-25 11:32 UTC Modified: 2015-02-26 20:52 UTC
From: daniel dot duclos2 at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.5.22 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot duclos2 at gmail dot com
New email:
PHP Version: OS:

 

 [2015-02-25 11:32 UTC] daniel dot duclos2 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.mysql-escape-string
---

There are 2 pink warning boxes which seem to be not consistant : the first one says that the function is deprecated since 5.5.0 while the second says it is since  5.3.0.

My experience is that the function works with 5.3 but not with 5.4. In the second case, PHP sends a warning indicateing that the function is deprecated.

Test script:
---------------
1st warning (in French) :
Avertissement
Cette extension est obsolète depuis PHP 5.5.0, et sera supprimée dans le futur. À la place, les extensions MySQLi ou PDO_MySQL doivent être utilisées. Voir aussi le guide MySQL : choix de l'API ainsi que la FAQ associée pour plus d'information. Voici les alternatives à cette fonction :
mysqli_escape_string()
PDO::quote()

2nd warning
Avertissement
Cette fonction est OBSOLETE depuis PHP 5.3.0. Nous vous encourageons vivement à ne plus l'utiliser.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-26 20:14 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2015-02-26 20:14 UTC] aharvey@php.net
Good catch: we were a bit too liberal in applying deprecation warnings when the extension was deprecated in 5.5 and added them to functions that were already deprecated, like mysql_escape_string(). I'll do a sweep through and clean that up.

My recollection — and sadly 3v4l is down, so I can't check this right now — is that we "soft deprecated" (deprecated in the manual, but not in the code) mysql_escape_string() and a few other functions in 5.3, so the warning is probably correct, but I'll check that when I can.
 [2015-02-26 20:52 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=336004
Log: Clarify when MySQL functions were deprecated if it was before 5.5.

No, the new 4.3.0 entity isn't a typo.

Fixes doc bug #69119 (Unconstancies in mysql_escape_string web page).
 [2015-02-26 20:52 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2015-02-26 20:52 UTC] aharvey@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 01:00:01 2026 UTC