$depth += (int)$value, 'up' => $depth -= (int)$value, 'forward' => $horizontal += (int)$value, }; } echo $depth * $horizontal; // 1635930