Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

18
  • 2
    Perhaps.. Too late to ask this question stackoverflow.com/questions/12859942/… Commented May 31, 2013 at 14:18
  • 1
    I'm asking why they have been deprecated and whether I should cease to use them, not why I shouldn't use them. Commented May 31, 2013 at 14:19
  • 4
    The last question isn't entirely answered in the other topic, so: Deprecation in PHP means not being maintained, only being left in there for legacy reasons, and most of all will be a removed in an undefined future version. So yes, you should definitely stop using it. Commented May 31, 2013 at 14:22
  • 3
    @NielsKeurentjes - We all know that the eventual removal will just result in mysql functions being lumped into a library and every host on the planet continuing to compile it into their PHP so as not to lose legacy customers. I'm asking why the features were deprecated. I can't find an official justification from the PHP team. Commented May 31, 2013 at 14:23
  • 2
    mysql_query is a very thin wrapper around the low-level C bindings and was introduced long before things like SQL injection issues were taken seriously. They were a stop-gap measure that's become a crutch and a liability. If history is any example, providers won't make a module to support these functions, they'll just make PHP 5.4 available for legacy apps, just as PHP 4 stuck around far, far too long. Commented May 31, 2013 at 14:28