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() );
Nope, because that would require changes in the language which we wouldn't want to do just for Perl.
The following could maybe be made to work:
$x->void->f();
$x->scalar->f()
$x->array->f()
Andi Andi
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php