Skip to content

Output getting buffered when running via command line  #1792

Description

@fijas

When running methods via CLI, output buffering is on.

Eg:

public function test() {
    for($i = 0; $i <= 10; $i++) {
        echo $i; sleep(2);
    }
}

this function prints the output all at once after running instead of printing with a 2 second delay. Adding ob_end_flush() outputs the result as expected. I don't think this is the expected behavior for CLI methods?

CI version: 4.0.0-beta1
PHP Version: 7.2.x

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions