Jump to content

How to place function parameters list in a variable for tidiness??


mrherman

Recommended Posts

Hi --

I have a debugging function that called like this

 

trace_log( file_name(__FILE__), script_name(), __FUNCTION__, __LINE__, var_name(), var_value());

 

As I use it many times within a script, is there a way to group the parameters in a variable or constant in order to make the line of code less cumbersome?  I know the following won't work, but to give an example of what I mean:

 

$paramList= "file_name(__FILE__), script_name(), __FUNCTION__, __LINE__, var_name(), var_value()";
trace_log( $paramList );

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.