Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32614 invoked from network); 5 Feb 2018 02:35:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2018 02:35:28 -0000 X-Host-Fingerprint: 95.150.120.127 unknown Received: from [95.150.120.127] ([95.150.120.127:5324] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/A8-49805-0F2C77A5 for ; Sun, 04 Feb 2018 21:35:28 -0500 Message-ID: To: internals@lists.php.net References: Date: Mon, 5 Feb 2018 02:35:24 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 95.150.120.127 Subject: Re: What to do with bundled GD's version info? From: ajf@ajf.me (Andrea Faulds) Hi Christoph, Christoph M. Becker wrote: > So the question is how to handle the version information of the bundled > libgd for the time being. With regard to gd_info()['GD Version'] just > saying "bundled" (without any compatibility statement) might be a good > solution. However, I'm at a loss how to handle GD_*_VERSION. Any ideas? This might be a bit… maverick, but I wonder if we could get away with a semi-numeric string constant. The string "2-phpbundled" would compare greater than or equal to 2: $ php -r 'var_dump("2-phpbundled" == 2);' bool(true) $ php -r 'var_dump("2-phpbundled" >= 2);' bool(true) The problem is that, well, some code out there might want an actual integer. It's also a bit ugly… Thanks. -- Andrea Faulds https://ajf.me/