includes/Support/class-http.php
Http boundary — resource teardown + last-response headers (REF-015).
Class Http
Class Http
final class Httppublicstatic is_php85_or_greater()
public static function is_php85_or_greater(?string=null $php_version): boolWhether the current runtime deprecates explicit handle-close calls (PHP 8.5+). Parameter Type Default Description $php_version?string=null— Optional version string for testing; defaults to PHP_VERSION.
Return: bool — True on PHP 8.5+, false below.
publicstatic close_curl_handle()
public static function close_curl_handle(& $ch, ?string=null $php_version): voidRelease a cURL handle without triggering the PHP 8.5 deprecation. Parameter Type Default Description $ch&— cURL handle to release (nulled in the caller scope). $php_version?string=null— Optional version override for testing; defaults to PHP_VERSION.
Return: void.
publicstatic close_curl_multi_handle()
public static function close_curl_multi_handle(& $mh, ?string=null $php_version): voidRelease a cURL multi handle without triggering the PHP 8.5 deprecation. Parameter Type Default Description $mh&— cURL multi handle to release (nulled in the caller scope). $php_version?string=null— Optional version override for testing; defaults to PHP_VERSION.
Return: void.
publicstatic destroy_gd_image()
public static function destroy_gd_image(& $image, ?string=null $php_version): voidRelease a GD image without triggering the PHP 8.5 deprecation. Parameter Type Default Description $image&— GD image to release (nulled in the caller scope). $php_version?string=null— Optional version override for testing; defaults to PHP_VERSION.
Return: void.
publicstatic close_curl_share_handle()
public static function close_curl_share_handle(& $sh, ?string=null $php_version): voidRelease a cURL share handle without triggering the PHP 8.5 deprecation. Parameter Type Default Description $sh&— cURL share handle to release (nulled in the caller scope). $php_version?string=null— Optional version override for testing; defaults to PHP_VERSION.
Return: void.
publicstatic close_finfo_handle()
public static function close_finfo_handle(& $finfo, ?string=null $php_version): voidRelease a finfo handle without triggering the PHP 8.5 deprecation. Parameter Type Default Description $finfo&— Finfo handle to release (nulled in the caller scope). $php_version?string=null— Optional version override for testing; defaults to PHP_VERSION.
Return: void.
publicstatic free_xml_parser()
public static function free_xml_parser(& $parser, ?string=null $php_version): voidRelease an XML parser without triggering the PHP 8.5 deprecation. Parameter Type Default Description $parser&— XML parser to release (nulled in the caller scope). $php_version?string=null— Optional version override for testing; defaults to PHP_VERSION.
Return: void.
publicstatic get_last_response_headers()
public static function get_last_response_headers(?array=null $legacy_source): arrayReturn the last HTTP response headers without touching the deprecated global. Parameter Type Default Description $legacy_source?array=null— Optional explicit header lines for the legacy path (string-filtered).
Return: string[] — List of response header lines, or empty array when unavailable.