Is php output buffering necessary here?

Viewed 24

I hope you can help this newbie. Working on understanding the php output buffering and I came across this php code in some file I'm working on:

        ...
        ...
        ob_end_clean();


        ob_start();

        display_user_list();

        $value = ob_get_contents();
        ob_end_clean();

        $this->display_field_content($value);

I am trying to understand if this is similar to:

        $this->display_field_content(display_user_list(););

So does it really make sense to use output buffering in this case?

Thank you in advance! Ozgur

0 Answers
Related