examples/calculatePi.php
public function run($input) {
		list($part_number, $part_step) = $input;
		$x=0.0;
		$sum=0.0;
		for ($i = $part_number; $i < $this->num_steps; $i += $part_step) {
			$x = ($i + 0.5) * $this->step;
			$sum += 4.0 / (1.0 + $x * $x);
		}
		return $sum;
	}
public function run($input) {
		list($part_number, $part_step) = $input;
		$x=0.0;
		$sum=0.0;
		for ($i = $part_number; $i < $this->num_steps; $i += $part_step) {
			$x = ($i + 0.5) * $this->step;
			$sum += 4.0 / (1.0 + $x * $x);
		}
		return $sum;
	}
run the work

@param \Serializable $input the data, that the worker should process
@return \Serializable Returns the result
@throws \Exception in case of a processing Error an Exception will be thrown