Re: Can i take the variable name in a function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-10-11 at 19:02 -0300, Jônata Tyska Carvalho wrote:
> i know what i want to do, and im not a rookie in php.
> 
> example of a use:
> 
> debug($vetNames);
> 
> output:
> 
> The variable vetNames has the follow properties:
> 
> key1 => value1,
> key2 => value2

Example:

<?php

function fooA( $fooA )
{
    return fooB( $fooA );
}

function fooB( $fooB )
{
    return fooC( $fooB );
}

function fooC( $fooC )
{
    return fooD( $fooC );
}

function fooD( $fooD )
{
    return fooE( $fooD );
}

function fooE( $fooE )
{
    return fooF( $fooE );
}

function fooF( $fooF )
{
    debug( $fooF );
}

fooA();

?>

So the question is... what name do you want? :B

And if you say 'fooF', then that's when you're calling the debug()
function so pass it yourself. Otherwise, you have a dilemma, and it sure
as hell isn't PHP's responsibility to forward the ancestry of names to
your debug function :)

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux