You are here: Re: How to get argument name for some function? « PHP Programming Language « IT news, forums, messages
Re: How to get argument name for some function?

Posted by doug turnbull on 11/01/06 04:25

Yarco wrote:
> For example:
>
> function test($left, $right)
> {
> }
>
> $ret = some_php_api('test');
>
> print_r($ret);
>
> //it would be
> /*
> array(
> 1 => 'left',
> 2 => 'right',
> )
> */

I can't help you with your main question.

However, assuming this is a function you control, could you track this
yourself?

$arg1 = "left";
$arg2 = "right";

#And maybe:

function_args['test']['arg1'] = $arg1;
function_args['test']['arg1'] = $arg2;

function test($$arg1, $$arg2)
{
#Should work
echo $left;
echo $right;
}

Somebody should confirm the code above and make sure I'm not insane,
but feel free to try it out, I think it should work.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация