Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32197 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24336 invoked by uid 1010); 10 Sep 2007 18:09:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 24321 invoked from network); 10 Sep 2007 18:09:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2007 18:09:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=hartmut@mysql.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=hartmut@mysql.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mysql.com from 213.136.52.68 cause and error) X-PHP-List-Original-Sender: hartmut@mysql.com X-Host-Fingerprint: 213.136.52.68 mailgate-out2.mysql.com Linux 2.5 (sometimes 2.4) (4) Received: from [213.136.52.68] ([213.136.52.68:57503] helo=mailgate.mysql.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/05-22994-B4885E64 for ; Mon, 10 Sep 2007 14:09:16 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.13.8/8.13.8) with ESMTP id l8AI8mwg021494; Mon, 10 Sep 2007 20:08:48 +0200 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 18984-06; Mon, 10 Sep 2007 20:08:48 +0200 (CEST) Received: from [10.100.64.53] (10-100-64-53.mysql.internal [10.100.64.53]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id l8AI8b8e013126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Sep 2007 20:08:38 +0200 Message-ID: <46E5882B.7010909@mysql.com> Date: Mon, 10 Sep 2007 20:08:43 +0200 Organization: MySQL AB User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061211 SeaMonkey/1.0.7 MIME-Version: 1.0 To: BuildSmart CC: Marcus Boerger , PHP Developers Mailing List References: <199717507.20070910145329@marcus-boerger.de> <64047417-3838-4E20-B767-110266B9F4A0@daleenterprise.com> In-Reply-To: <64047417-3838-4E20-B767-110266B9F4A0@daleenterprise.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: Re: [PHP-DEV] PHP_FALIAS() From: hartmut@mysql.com (Hartmut Holzgraefe) BuildSmart wrote: > Thanks for the response, OK I think I can manage that with ease, what=20 > I'm contemplating to do is create a mysql_alias extension that aliases = > the mysql extension functions to the mysqli equivalents uh .... PHP_FALIAS() would only work for functions having exactly the same parameter signature ... so it would only work with a very minor subset of the mysql/mysqli functions (if at all). For a lot of functions the signature changed so that the database handle is now the first parmeter instead of the last, and even for those that look similar you have to take into account that mysqli relies on objects (even for the procedural style functions) where ext/mysql is all about resources, not objects. There is also the concept of the default connection in ext/mysql that does not exist in ext/mysqli at all so that can't be emulated by just aliasing functions either ... While a ext/mysql -> ext/mysqli compatibility wrapper might make sense it is way more effort to create one, and if you really want to go that way i'd recommend that you do a proof-of-concept implementation using PHP code first before starting the effort to wrap it up in a C extension. That aside i don't think that it would make much sense to create such a wrapper, ext/mysql being deprecated says that we won't add any new features to it. There are no plans to remove it though and any serious security issues or possible incompatibilities with newer libmysqlclient versions will still be fixed. --=20 Hartmut Holzgraefe, Principal Support Engineer . Discover new MySQL Monitoring & Advisory features at: http://www.mysql.com/products/enterprise/whats_new.html Hauptsitz: MySQL GmbH, Dachauer Str.37, 80335 M=FCnchen Gesch=E4ftsf=FChrer: Kaj Arn=F6 - HRB M=FCnchen 162140