The weird thing is, the values of the parameters in the array change for no reason I can see, mid way through a function which doesn't even use $this->function_parameters->pp_ip
This is the function:
- Code: Select all
function spline_vary_spline_morse($input_parameters, $variation_bounds){
$fixed_a = $input_parameters->a;
$fixed_de = $input_parameters->de;
$fixed_re = $input_parameters->re;
$varied_re = $this->vary_number($variation_bounds->re_lower, $variation_bounds->re_upper);
$this->log_event("Loop ".$this->loop_counter." Vary morse radius from ".$fixed_re." to ".$varied_re,3);
$varied_de = $this->vary_number($variation_bounds->de_lower, $variation_bounds->de_upper);
$this->log_event("Loop ".$this->loop_counter." Vary morse depth from ".$fixed_de." to ".$varied_de,3);
$varied_a = $this->vary_number($variation_bounds->a_lower, $variation_bounds->a_upper);
$this->log_event("Loop ".$this->loop_counter." Vary morse a from ".$fixed_a." to ".$varied_a,3);
$output_parameters = $input_parameters;
print_r($output_parameters);
echo "2a".chr(13).chr(10);
print_r($this->function_parameters->pp_ip);
echo chr(13).chr(10);
$output_parameters->a = $varied_a;
$output_parameters->de = $varied_de;
$output_parameters->re = $varied_re;
print_r($output_parameters);
echo "2b".chr(13).chr(10);
print_r($this->function_parameters->pp_ip);
echo chr(13).chr(10);
return $output_parameters;
}
I've only put print_r in there to figure out where the values change, and it's seems to be when I assign the values to $output_parameters. The thing that gets me is that the $varied_a, $varied_de and $varied_re are the new values that appear in $this->function_parameters->pp_ip.
Are $this->function_parameters->pp_ip and $output_parameters some how linked? Am I just missing something completely about how they work in php?
Thanks


