Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8295 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72562 invoked by uid 1010); 2 Mar 2004 07:49:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 72538 invoked from network); 2 Mar 2004 07:49:04 -0000 Received: from unknown (HELO flis.man.torun.pl) (158.75.33.142) by pb1.pair.com with SMTP; 2 Mar 2004 07:49:04 -0000 Received: from localhost (localhost [127.0.0.1]) by local-flis.man.torun.pl (Postfix) with SMTP id 189D42AC00; Tue, 2 Mar 2004 08:49:04 +0100 (CET) X-AV-Checked: Tue Mar 2 08:49:04 2004 flis-sophie Received: by flis.man.torun.pl (Postfix, from userid 117) id EA9CF2AC36; Tue, 2 Mar 2004 08:49:03 +0100 (CET) X-Spam-Filter: flis.man.torun.pl Tue Mar 2 08:49:03 2004 Received: from oryl.man.torun.pl (oryl [158.75.22.164]) by local-tor-sophie.man.torun.pl (Postfix) with ESMTP id EAE5B2AC00; Tue, 2 Mar 2004 08:48:34 +0100 (CET) Received: by oryl.man.torun.pl (Postfix, from userid 202) id D5EF31D90F; Tue, 2 Mar 2004 08:48:34 +0100 (CET) Date: Tue, 2 Mar 2004 08:48:34 +0100 To: Andi Gutmans Cc: internals@lists.php.net Message-ID: <20040302074834.GA2894@oryl.man.torun.pl> References: <5.1.0.14.2.20040302000350.0272fc70@127.0.0.1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20040302000350.0272fc70@127.0.0.1> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-5.6 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, SIGNATURE_SHORT_DENSE,USER_AGENT,USER_AGENT_MUTT version=2.50-cvs X-Spam-Level: Subject: Re: [PHP-DEV] Perl extension From: makler+php-dev@man.torun.pl (Piotr Klaban) On Tue, Mar 02, 2004 at 12:10:51AM +0200, Andi Gutmans wrote: > $x = new Perl("Test"); > $y = new PerlScalar($x); The above could generate mistakes. It is better to use perl_wantarray(something) or perl_wantarray(); something;. > Any ideas or suggestions? It would also be cool if people could mess around > with it a bit and give us some feedback. Is this possible (?): $x = new Perl("Test"); $y = $x->f(); // scalar context $x->f(); // void context $y = array( $x->f() ); // array context or maybe $y = perl_array( $x->f() ); Best regards, -- Piotr Klaban