Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105768 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63441 invoked from network); 21 May 2019 08:35:13 -0000 Received: from unknown (HELO thephantoms.co.uk) (176.126.243.54) by pb1.pair.com with SMTP; 21 May 2019 08:35:13 -0000 Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=exussum.co.uk; s=default; x=1559022153; h=Comment: DomainKey-Signature:Received:To:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To: References:Message-ID:User-Agent; bh=wwPY7RiuYIzFXLkW4y4kiimPyzK 4HfFjP3lm9GJJlcE=; b=drz/UwJwr9VTfc32w7YG6Magd90pqFRGN5I/vMcffhZ 5cp8S+UiBcpEZSeLy8Tl9HePFhAtsrEFtqgGzWVvVID9806QyqmRa9jEfRPaTXWC aP87aEyDNBqrWBAOha9GLSdDTbWqRF3aHYtf1BjLgIbahdNH3n0pM4RSBWJrKNfk = Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=exussum.co.uk; h=Received:To:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:References:Message-ID:X-Sender:User-Agent; b=TeQgbv2A4JSiiVgk92Ur6UMzfvEI6JJOCOLFoY/23McK4XZFlKLZgkgf1a+4Y8 CMdbdPRTennwsFtF7gKMI2HcjfQLVx0ypo4R6+DRflEPjNgQMl0zYJbM7wir9shF n4ruUKqqCaKOfSmFrX6D//unReiIpFAnNl64tR34tqIjE=; Received: (qmail 593 invoked by uid 48); 21 May 2019 05:42:32 -0000 To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 21 May 2019 06:42:32 +0100 In-Reply-To: <4bdc84d133912367ab9d5139f37f9a6e@exussum.co.uk> References: <4bdc84d133912367ab9d5139f37f9a6e@exussum.co.uk> Message-ID: <2ba93b339e2291b2680186726e0e32ad@exussum.co.uk> X-Sender: scott@exussum.co.uk User-Agent: RoundCube Webmail/0.1 Subject: Re: [PHP-DEV] [RFC] Base convert changes From: scott@exussum.co.uk (Scott Dutton) Not sure if I can add and example to the RFC at this point, but I came across another example of this recently. https://gist.github.com/iansltx/4820b02ab276c3306314daaa41573445#file-getlines-php-L9 // bindec() was doing weird things, hence converting through hex first // sttrev() to match endian-ness to expectations; zip file values are little-endian $compressedSize = hexdec(bin2hex(strrev(fread($stream, 4)))); // compressed size bindec was returning 0 without warning, as it was passed binary data not a binary string. No warning bin2hex actually does the correct translation. a warning here would have at least indicated there was something wrong with the input it was being passed instead of just 0. Thanks Scott