Console

PHP Advanced Console
public function printTextToConsoleInRealTime()
{
    // Open the standard output stream
    $outputStream = fopen('php://stdout', 'w');

    // Output text to the console in real-time
    fwrite($outputStream, "This is a message that will appear immediately in the console.\n");

    // Continue with your code
    // ...

    // Close the output stream when you're done
    fclose($outputStream);
}