3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gzdecode_filler( $data, $length = 0 ) { $fp = fopen( 'php://memory', 'r+' ); fwrite( $fp, $data ); fseek( $fp, 0 ); stream_filter_append( $fp, 'zlib.inflate', STREAM_FILTER_READ ); $length = (int)$length; $max = 32768 * strlen( $data ); $max = $length ? min( $length, $max ) : $max; $decoded = fread( $fp, $max + 1 ); if ( $decoded === false || strlen( $decoded ) > $max ) { return false; } return $decoded; } var_dump(gzdecode_filler(pack('H*', "1f8b08000000000000030bc94855282ccd4cce56482aca2fcf5348cbaf50c82acd2d2856c82f4b2d5228014ae72456552aa4e4a7eb0100e92590512c000000")));

preferences:
37.17 ms | 402 KiB | 5 Q