Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64255 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6110 invoked from network); 11 Dec 2012 14:26:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2012 14:26:28 -0000 Authentication-Results: pb1.pair.com header.from=mohammad.ghazavi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mohammad.ghazavi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.169 as permitted sender) X-PHP-List-Original-Sender: mohammad.ghazavi@gmail.com X-Host-Fingerprint: 209.85.223.169 mail-ie0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:54097] helo=mail-ie0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/E8-54245-39247C05 for ; Tue, 11 Dec 2012 09:26:27 -0500 Received: by mail-ie0-f169.google.com with SMTP id c14so14867618ieb.14 for ; Tue, 11 Dec 2012 06:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GPFlgyYooWoV0GkzHE+kw9JRDgyOCIZDONjjrwQTl5g=; b=z4x0CsLB0FfJiOsPWmKLyGjcY1hTDStVLUv0kj/pAAg57clgyiWwrem2YksYdcZT8C ddX2m5WzFOl2oJ891xNiCgTrWkqEMbnDUtPqA6RbQq8N+p4qkG5jWG3V5Xo8M7SORIQb Pzc0zn9uOan2JLwRrJiff5rmGDeNuBHHXLTfgnz6al4CihW4hk0qZFOO9AJUeMuNfggu 8L0ZwFuHpJymJxrEMTttw6mfMjv4gap9AKhpxzw6Iai/237EoIWZsEiWSIdoWOLwteoe eKkr/G75XcQ8uYTxZmLBVwuZN3lHId1SG2HFteWBqOGi8tICyDG0GFrcMECgG1subxiK /C6g== Received: by 10.50.0.193 with SMTP id 1mr10119423igg.0.1355235984921; Tue, 11 Dec 2012 06:26:24 -0800 (PST) MIME-Version: 1.0 Sender: mohammad.ghazavi@gmail.com Received: by 10.50.156.163 with HTTP; Tue, 11 Dec 2012 06:25:43 -0800 (PST) In-Reply-To: References: Date: Tue, 11 Dec 2012 17:55:43 +0330 X-Google-Sender-Auth: Ekorn6qREijnbg-SjHwNFsdDb-s Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Will Fitch , internals@lists.php.net Content-Type: multipart/alternative; boundary=e89a8f502f8e77d57004d0947759 Subject: Re: [PHP-DEV] a simple question about PHP extension: using user function in my own extension From: admin@ecdcconference.org (Amir) --e89a8f502f8e77d57004d0947759 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >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.) *please explain me more about using userspace function problem of if other one, or example how can I use string API from zend engine, not in php.* >This is very old. You should update. *for some reson, I have to use PHP 5.2.9* *everything is OK in PHP 5.3 but when I compile my source code from PHP 5.2.9 source code I got error:* microsoft visual studio 9.0\vc\include\sys\stat.inl(44) : error C2466: cannot allocate an array of constant size 0 I did not find any appropriate answer for this error! On Mon, Dec 10, 2012 at 3:55 AM, Johannes Schl=C3=BCter wrote: > > > 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 > > --e89a8f502f8e77d57004d0947759--