- var_dump: documentation ( source)
<?php
class TestSampleClass
{
public function doSomething($one = null, $two, $threee = null)
{
return null;
}
}
$tests = array(
array('one', null),
array('two', null),
array('three', null)
);
foreach($tests as $test)
{
$param = new ReflectionParameter(array('TestSampleClass', 'doSomething'), $test[0]);
var_dump($param->isDefaultValueAvailable());
}