Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60355 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41908 invoked from network); 28 Apr 2012 21:49:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2012 21:49:10 -0000 Authentication-Results: pb1.pair.com header.from=yader.hernandez@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yader.hernandez@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: yader.hernandez@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:39592] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/37-06766-3D56C9F4 for ; Sat, 28 Apr 2012 17:49:08 -0400 Received: by obbuo13 with SMTP id uo13so2709816obb.29 for ; Sat, 28 Apr 2012 14:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/05zKXsXsLgKWX2r/mAKNYK2MQfJpSPKe3n3TX4op8M=; b=kscKgPHyf2GrII9JZioeMGqhk4jEXuM5EYrB+NwGo0l23JFFx+fKf5MoGHmhoM1pH5 FgbzP8ULUQyOD8Vn1UHhtxm+OY9O203eLUySriF5zuYpAphL+Q0mWPXN9R8VQP5O3iit ABYAKBfPX0/SGAzkCqoFmq66tVl8E+dRod1BA8D0OXmpClHt6K/2TqCDtCvw/wO/8ulx y0W4r4Yav7aF3Tuuoewv1Fpdxit9yTzgKXhA4LWW/B0FBfE9E3xiM1MrFT9/j6YTNoLY WO3ncedzUkkHY/hR60UN69+k/W8mBody+1rbQ5+SaW4Emhuq1muy3VNuf9kZApVKLLtZ MJFA== MIME-Version: 1.0 Received: by 10.60.19.106 with SMTP id d10mr19083459oee.40.1335649745030; Sat, 28 Apr 2012 14:49:05 -0700 (PDT) Received: by 10.60.147.199 with HTTP; Sat, 28 Apr 2012 14:49:04 -0700 (PDT) In-Reply-To: References: Date: Sat, 28 Apr 2012 14:49:04 -0700 Message-ID: To: jpauli Cc: Laruence , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=e89a8ff1c4a898cc9304bec43035 Subject: Re: [PHP-DEV] call user defined function with args From: yader.hernandez@gmail.com (Yader Hernandez) --e89a8ff1c4a898cc9304bec43035 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Apr 27, 2012 at 1:06 AM, jpauli wrote: > You might be interested by zend_call_method_with_[XXX]_params() as > well http://lxr.php.net/xref/PHP_5_3/Zend/zend_interfaces.h > > Julien.Pauli > > On Fri, Apr 27, 2012 at 8:51 AM, Laruence wrote: > > Hi: > > you can refer to zif_call_user_func, which could be find at > > > http://lxr.php.net/opengrok/xref/PHP_5_4/ext/standard/basic_functions.c#4714 > > > > thanks > > > > On Fri, Apr 27, 2012 at 12:43 PM, Yader Hernandez > > wrote: > >> Hello, > >> > >> I found this zend_call_function(zend_fcall_info *fci, > zend_fcall_info_cache > >> *fci_cache TSRMLS_DC) and many examples using it. I can successfully > call > >> this and it will call the user function for me. I'm interested in > learning > >> how to not only call the function, but also pass arguments to that > function. > >> > >> Can anyone please point me to where I can see how that's done? > >> > >> thx > > > > > > > > -- > > Laruence Xinchen Hui > > http://www.laruence.com/ > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > I had a look at http://lxr.php.net/opengrok/xref/PHP_5_4/ext/standard/basic_functions.c#4714 and I don't understand how it's passing the arguments into the closure given by the user. I can successfully call the closure given, but passing arguments into the closure is something I'm not clear on. Can someone please shed some light? --e89a8ff1c4a898cc9304bec43035--