Default arguemnts only used when you don't pass an argument in its place.
$result = get_param($_POST['param1']);
The function would have these values: get_param($_POST['param1'], 'value2', 0, 0)
If you want to do it with null s, like in your code, then you need to check the value of the argument. Like this:
function get_param ($param1, $param2, $start, $end){
$param2 = ($param2 == null) ? 'value2' : $param2;
$start = ($start == null) ? 0 : $start;
$end = ($end== null) ? 0 : $end;
}