<?php
if(version_compare(PHP_VERSION, '5') < 0) {
die(0);
}
class C {
function M($p = 0) {
}
}
$rc = new ReflectionClass('C');
$rmList = $rc->getMethods();
$rm = $rmList[0];
$rpList = $rm->getParameters();
$rp = $rpList[0];
echo $rp->getDefaultValue() ? 'Method has a default value' : 'Method does not have a default value';