using duty prototypes boldly php


i'm minute make php where parser determins duty dynamically, kind this:



// construction call
$function_call_spec = array( "prototype" => "myfunction",
"parameters" => array( "first_par" => "hello",
"second_par" => "world"));

// dispatch
$funcprototype = $function_call_spec["prototype"];
$funcprototype(); // here duty 'myfunction'.


this glorious dandy. nonetheless comes unbroken step, flitting parameters, i don't unequivocally know it's illusory proceed i wish it. never stops surprising me however book languages days, here goes:



one pass parameters duty this:



// here duty 'myfunction' array parameters.
$funcprototype( $function_call_spec["parameters"] );


however, i wish announce 'myfunction' morally pristine arguments etc:



function myfunction( $first_par, $second_par )
{

}


the doubt following follows - there any proceed pass parameters duty boldly simply looping by parameter array?



to clarify, i don't wish this:



$funcprototype( $function_call_spec["parameters"]["first_par"],
$function_call_spec["parameters"]["second_par"] );


because requires formula statically know sum myfunction, goes opposing whole idea.



instead i wish proceed maybe:



// special incantation php duty used invoking functions dynamically
invokefunction( $funcprototype, $function_call_spec["parameters"] );


which following law myfunction being called parameters array gets upheld any sole parameter non-static prototype.



any comments welcome.



regards.



/r



ps: zero formula post tested typos etc.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?