<target name="test_env">
<echo>${environment}</echo>
</target>
m00t@m00t:~/***$ phing test_env -Denvironment=test1
Buildfile: ****/build.xml
**** > test_env:
[echo] test1
BUILD FINISHED
Total time: 0.0969 seconds
function test_function($param1, $param2 = NULL)
{
echo $param1;
}
$ref_function = new ReflectionFunction('test_function');
foreach($ref_function->getParameters() as $param)
{
var_dump($param->isOptional());
}
var_dump($ref_function->getNumberOfRequiredParameters());
bool(false)
bool(true)
int(1)