<?php

$string = "-2.43+3.62/2.1*9.02";

function calculate($string)
{
	$reg = '/(\-*\d+([.,]\d+)*)|(\*)|(\/)|(\+)|(\-)/';
	
	//Разбиваем выражение на данные и операторы
	if (preg_match_all($reg, $string, $matches)) {
		foreach($matches[0] as $position => $value) {

			//Определяем приоритет действий
			switch($value) {
				case '*':
				$steps[1][$position] = $value;
				break;
				case '/':
				$steps[1][$position] = $value;
				break;
				case '+':
				$steps[2][$position] = $value;
				break;
				case '-':
				$steps[2][$position] = $value;
				break;
			}
		}
		
		ksort($steps);
		

		//Считаем первое действие...
		foreach($steps as $step) {
			foreach($step as $position => $operator) {
				switch($operator) {
					case '*':
						$exp = $matches[0][$position - 1] * $matches[0][$position +1];
						break;
					case '/':
						$exp = $matches[0][$position - 1] / $matches[0][$position +1];
						break;
					case '+':
						$exp = $matches[0][$position - 1] + $matches[0][$position +1];
						break;
					case '-':
						$exp = $matches[0][$position - 1] - $matches[0][$position +1];
						break;
				}
				
				
				//Получаем новое выражение с новыми данными
				$newMatches = [];
				
				foreach($matches[0] as $key => $value) {
					if($key == $position - 1 or $key == $position or $key == $position + 1) {
						if ($key == $position) {
							$newMatches[] = $exp;
						}
						
						continue;
					}
					
					$newMatches[] = $value;
				}
				
				$newString = '';
				
				foreach($newMatches as $value) {
					$newString .=  $value;
				}
				
				//Рекурсивно повторяем вычисление до тех пор пока не получим единственное значение т.е. ответ
				if (count($newMatches) != 1) {
					return calculate($newString);
				} else {
					return $newMatches[0];
				}
				
				break;
			}
		}
	}
}

var_dump(calculate($string));