Is it possible and useful to create a sequence diagram without object orientation in PHP?

It is possible to create a sequence diagram in PHP without object orientation by representing the flow of interactions between different functions or modules in a linear manner. This can be useful for visualizing the order of function calls and data flow in a system without the need for object-oriented concepts.

// Example of creating a sequence diagram without object orientation in PHP

function processInput($input) {
    // Process input data
    return $input;
}

function validateData($data) {
    // Validate input data
    return $data;
}

function sendData($data) {
    // Send data to external system
    return $data;
}

// Main program flow
$input = "example";
$data = processInput($input);
$validatedData = validateData($data);
$result = sendData($validatedData);

echo $result;