I came across a weird error in PHP:

mysql()

I tried with three different setups, and each time declaring a function with this name and any or no arguments generates an error:

Fatal error: Cannot redeclare mysql()

Yet, I cannot find a function with such name in the function index, if it really existed I guess it would have been here. I tried searching the web but the ambiguity of my search queries makes any info on this difficult to find.

Usefullness of having a function called simply mysql() aside, what is this function and why is it not documented?


Possibilities I ruled out:

  • That it could be a class constructor (there is no such class)
  • That the name of the module is the cause of conflict (doesn't work with other modules, like mssql)
有帮助吗?

解决方案

just a non documented reserved word http://php.net/manual/en/reserved.keywords.php

checking the source code, i've seen that function is empty

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top