Re: PHP_FALIAS()
| From: | Johannes Schlüter | Date: | Mon, 10 Sep 2007 14:45:15 +0000 |
| Subject: | Re: PHP_FALIAS() | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32190@lists.php.net to get a copy of this message | ||
Hi,
On Monday 10 September 2007 03:31:32 pm BuildSmart wrote:
> Thanks for the response, OK I think I can manage that with ease, what
> I'm contemplating to do is create a mysql_alias extension that
> aliases the mysql extension functions to the mysqli equivalents since
> a lot of scripts and packages are already dependent on the mysql
> extension but it's been deprecated (so I've been informed) and I was
> thinking of a simple method to allow the dropping of the mysql
> extension in favor of the mysqli extension without having to rewrite
> existing scripts and packages.
I, personally, don't think it's such a good idea to replace the dependency of
the mysql extension with an dependency on two extensions, mysql_alias+mysqli,
and also you should keep in mind that ext/mysql and ext/mysqli might work a
bit different in a few minor places.
For going from ext/mysql to ext/mysqli the MySQL guys have some conversion
script somewhere on their site afaik.
And a last thought: If you need a wrapper wrapping ext/mysql API over mysqli
I'd do it in PHP since distributing PHP code is way simpler than distributing
some extension and the performance lost can be ignored since most time is
still lost while doing communication with the database server. (the few
exceptions usually can do other optimizations giving better results or simply
use no wrapper)
johannes
--
Johannes Schlüter
http://schlueters.de