Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-07-14 Thread Rune Kaagaard
Will this work: array('foo', 'bar')('arg1', 'arg2') ? On Wed, Jun 8, 2011 at 3:48 PM, Christian Kaps christian.k...@mohiva.com wrote: On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote: On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena felipe...@gmail.com wrote: class foo {   public

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-07-14 Thread Felipe Pena
2011/7/14 Rune Kaagaard rumi...@gmail.com: Will this work:    array('foo', 'bar')('arg1', 'arg2') ? No, and it isn't supposed to either. -- Regards, Felipe Pena -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Christian Kaps
Hi, Hi all, Reading our bug tracker I noticed a good feature request [1] from 2009 which points to an interesting feature that I think makes sense for us, since we are now working with $f() using objects and strings, and the array('class', 'method') is an old known for

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Felipe Pena
Hi, 2011/6/8 Christian Kaps christian.k...@mohiva.com Hi, Hi all, Reading our bug tracker I noticed a good feature request [1] from 2009 which points to an interesting feature that I think makes sense for us, since we are now working with $f() using objects and strings, and the

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Christian Kaps
On Wed, 8 Jun 2011 08:57:48 -0300, Felipe Pena wrote: Hi, 2011/6/8 Christian Kaps christian.k...@mohiva.com Hi, what happens if I use this code. class Foo { public $bar; public function __construct() { $this-bar = array($this, 'baz'); $this-bar(); } public function

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Felipe Pena
2011/6/8 Christian Kaps christian.k...@mohiva.com On Wed, 8 Jun 2011 08:57:48 -0300, Felipe Pena wrote: Hi, 2011/6/8 Christian Kaps christian.k...@mohiva.com Hi, what happens if I use this code. class Foo { public $bar; public function __construct() { $this-bar =

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Jordi Boggiano
On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena felipe...@gmail.com wrote: class foo {   public function __construct() {      $this-bar = function () { return 1; };      // $this-bar(); // error      $x = $this-bar;      $x(); // ok      $this-bar = array($this, 'baz');      // $this-bar();

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Christian Kaps
On Wed, 8 Jun 2011 09:46:26 -0300, Felipe Pena wrote: It works in the same way: class foo { public function __construct() { $this-bar = function () { return 1; }; // $this-bar(); // error $x = $this-bar; $x(); // ok $this-bar = array($this, 'baz'); //

Re: [PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-08 Thread Christian Kaps
On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote: On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena felipe...@gmail.com wrote: class foo {   public function __construct() {      $this-bar = function () { return 1; };      // $this-bar(); // error      $x = $this-bar;      $x(); // ok      

[PHP-DEV] Re: $arr = array('Hello', 'world'); $arr();

2011-06-06 Thread Matthew Weier O'Phinney
On 2011-06-05, Felipe Pena felipe...@gmail.com wrote: Reading our bug tracker I noticed a good feature request [1] from 2009 which points to an interesting feature that I think makes sense for us, since we are now working with $f() using objects and strings, and the array('class', 'method') is