$_POST['number_1'] + $_POST['number_2'], 'status' => "fertig" ]; header( 'Content-type: application/json' ); echo json_encode( $response ); // array in JSON konvertieren } else throw new Exception( 'no numbers given', 500 );