php capture include code example Example: php capture include ob_start(); include 'test.php'; $output = ob_get_clean();