Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[soon-to-be-rfc] Implement GH-9673: $length argument for fpassthru #10476

Closed
wants to merge 1 commit into from

Commits on Jan 31, 2023

  1. Implement phpGH-9673: $length argument for fpassthru

    This implements an optional $length argument to fpassthru,
    SplFileObject::fpassthru and gzpassthru for partially copying the file
    to the output. The behaviour of this new argument has the same behaviour
    as the $length argument of stream_copy_to_stream.
    
    Internally, a new macro and function is introduced:
    _php_stream_passthru_with_length. _php_stream_passthru now calls the new
    function to perform its tasks without introducing a BC break internally.
    
    This unfortunately has one BC break: classes overriding SplFileObject
    must update the method signature of fpassthru to add the new argument.
    nielsdos committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    e1c712e View commit details
    Browse the repository at this point in the history