Re: Remove ext/mysql from trunk? (was: Re: [PHP-DEV] Remove sqlite2 from trunk)
| From: | Johannes Schlüter | Date: | Sat, 19 Jun 2010 11:00:19 +0000 |
| Subject: | Re: Remove ext/mysql from trunk? (was: Re: [PHP-DEV] Remove sqlite2 from trunk) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48837@lists.php.net to get a copy of this message | ||
On Sat, 2010-06-19 at 12:45 +0200, Sebastian Bergmann wrote:
> Am 19.06.2010 11:33, schrieb Patrick ALLAERT:
> > What are the possible actions/alternatives?
>
> I think this was already mentioned: add a BC layer to ext/mysqli so
> that the "new" extension supports the old mysql_* functions. This would
> rid us off the old ext/mysql code without breaking code that relies on
> it.
... while such a wrapper has about the same amount of code as the
classic mysql extension (... which is in most parts a simple wrapper
over library functions...) Or in other words: Such a wrapper doesn't
have real benefits.
What might be interesting is to write the wrapper in 100% PHP on top of
mysqli. that gives an easy migration path (include/auto_prepend that
lib) and makes the purpose clear ... (while there is one major
limitation with such an approach: The old mysql extension uses resources
whereas mysqli uses objects, so $conn = mysql_connect();
var_dump(is_resource($conn)); can't be emulated that way)
johannes
--
Johannes Schlüter
MySQL Engineering Connectors and Client Connectivity
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht München: HRB161028 Geschäftsführer: Jürgen Kunz