2011/7/14 Rune Kaagaard :
> 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
Will this work:
array('foo', 'bar')('arg1', 'arg2')
?
On Wed, Jun 8, 2011 at 3:48 PM, Christian Kaps
wrote:
> On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote:
>>
>> On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena wrote:
>>>
>>> class foo {
>>> public function __construct() {
>>>
On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote:
On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena
wrote:
class foo {
public function __construct() {
$this->bar = function () { return 1; };
// $this->bar(); // error
$x = $this->bar;
$x(); // ok
$this->bar = array($
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');
//
On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena 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(); // erro
2011/6/8 Christian Kaps
> On Wed, 8 Jun 2011 08:57:48 -0300, Felipe Pena wrote:
>
>> Hi,
>>
>> 2011/6/8 Christian Kaps
>>
>> Hi,
>>>
>>>
>>> what happens if I use this code.
>>>
>>> class Foo {
>>>
>>> public $bar;
>>>
>>> public function __construct() {
>>>
>>> $this->bar = array($this,
On Wed, 8 Jun 2011 08:57:48 -0300, Felipe Pena wrote:
Hi,
2011/6/8 Christian Kaps
Hi,
what happens if I use this code.
class Foo {
public $bar;
public function __construct() {
$this->bar = array($this, 'baz');
$this->bar();
}
public function bar() {
echo 'bar';
Hi,
2011/6/8 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',
>> '
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 call_user_func()-like
On 2011-06-05, Felipe Pena 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 an old known fo
10 matches
Mail list logo