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)
нет, с подзапросом не то…Да не вопрос:
SELECT o.*
FROM oper AS o
JOIN oper AS o2
ON o.id_country = o2.id_country
GROUP BY o.id_country, o.id_num
HAVING o.cost = MAX(o2.cost)