Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64213 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31108 invoked from network); 10 Dec 2012 00:25:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Dec 2012 00:25:19 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:56923] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/CD-13109-DEB25C05 for ; Sun, 09 Dec 2012 19:25:18 -0500 Received: from transformer.fritz.box (ppp-93-104-29-33.dynamic.mnet-online.de [93.104.29.33]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 5C9B365EF8; Mon, 10 Dec 2012 01:25:14 +0100 (CET) User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Mon, 10 Dec 2012 01:25:08 +0100 To: Amir ,Will Fitch CC: internals@lists.php.net Message-ID: Subject: Re: [PHP-DEV] a simple question about PHP extension: using user function in my own extension From: johannes@schlueters.de (=?ISO-8859-1?Q?Johannes_Schl=FCter?=) Amir wrote: >it is no mater using mysql function or other function. I want to use >both >as function in my extension. It matters as calling userspace functions is in at least 90% of the cases the wrong approach and there are better ones. The better approach depends on the goal. (The only times where it is a good thing to do is when calling a user provided callback as in usort() or a method from an object extending an internal class s in some iterators etc.) >I used PHP 5.2.9 so i have lib mysql instead of mysqlnd. This is very old. You should update. >Is there any way to use lib mysql in c-Level API? libmysql is the MySQL Client Library. Refer to http://dev.mysql.com/doc/refman/5.5/en/c.html johannes