php test source:
<?php
echo "TEST 1\n";
function a($a,$b,$c)
{
echo "$a $b $c\n";
}
function aa()
{
call_user_func_array('a',func_get_args());// a(pervade();
}
aa(1,2,3);
echo "TEST 2\n";
class BaseType{}
class SonType extends BaseType{}
class base
{
protected function insert(BaseType $o,$a,$b,$c)
{
print_r(func_get_args());
}
}
class son extends base
{
public function insert(SonType $o)
{
call_user_func_array(array('parent','insert'),func_get_args()); //
parent::insert(pervade());
}
}
$son = new son();
$son->insert(new SonType(),1,2,3);
php test result:
TEST 1
1 2 3
TEST 2
Array
(
[0] => SonType Object
(
)
[1] => 1
[2] => 2
[3] => 3
)
On Tue, May 18, 2010 at 8:50 PM, Mathias Grimm <[email protected]>wrote:
> ok, sorry!
> the name isn't important at this moment,can be anyone, can be pervade for
> example.
>
> i'm suggesting new feature, the name can be decided later
>
>
>
>
> On Tue, May 18, 2010 at 8:13 PM, Stas Malyshev <[email protected]>wrote:
>
>> We already have function with this name: http://us.php.net/passthru
>>
>> --
>> Stanislav Malyshev, Software Architect
>> SugarCrm: http://www.sugarcrm.com/
>> (408)454-6900 ext. 227
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> Mathias Grimm
>
> Sun Certified Java Programmer 6.0 #SUN604760
> Zend Certified Engineer #ZEND006756
>
> http://mathiasgrimm.com.br
> http://phpempregos.com.br
>
--
Mathias Grimm
Sun Certified Java Programmer 6.0 #SUN604760
Zend Certified Engineer #ZEND006756
http://mathiasgrimm.com.br
http://phpempregos.com.br