Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44552 invoked from network); 6 Feb 2018 18:32:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2018 18:32:57 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:41943] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/95-49805-5D4F97A5 for ; Tue, 06 Feb 2018 13:32:54 -0500 Received: from [192.168.2.105] ([87.167.204.39]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MKHMk-1ekmCn3K3K-001hCX; Tue, 06 Feb 2018 19:32:47 +0100 To: Andrea Faulds , internals@lists.php.net References: Message-ID: Date: Tue, 6 Feb 2018 19:32:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:ECV7tgS2ZFPHqT78RbvTRAg7YRVU2br/CMp67dU3RXF4VQ8J9wb pZ3ClumwngjI6UuVPdlp87ZKZN8GEqDvi0fMbn5z9DK4tYRqEupM0EhRY5NH0NKV/80mMM2 OIHVLMlb40XR2WEqUttvBfU6Jjsg8TqCfVNZjR6LVQiJMyBRzTt8rJQrkD3kAIPG3csKfs+ sw2quZOCLw2zyKSxWefbA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ssZPB9Y6f0E=:uMsEzShVfEU04+QJN9t1Ju R6t3wpPLfHz4E4Al54FnxjdqL8PFjI60qY0uxg1rNwd9PJLjvh2rFca+20WSHDePwHh/pdaxM YD8WgkQa8FFhNg3+lbjHXHqzFbp2UBaPAuvE3n1EEaNRs7Hzxb3UtXTzJ9Fezwfrje/UsEwoE 9KnvB17yaVmxHqnK8VuMpVP2hdh9RAZRYqtrOyejHyoqPsrns9YczZgQHS2+kEUYTVkOgqBJC D1FAug/0IhrypX2m9rmyjWyMOwz3YGkbUMURreHHMY38cBi7oogd9MIyQ3yo3OHJIZj3HyNLE BVisIjGiDK9Y7LCi43WdqZSRdU6cVgKS9+RJOoHPkY3hI1quv4b2ztw9rRwNPyXCdQ9Tb7Y++ 5G+J3zzujYMirj9hEhAC5xqXSUHU2QT8CDC6vkAE1J1Keh9044YUngcWd1ELsPqdVWF+RqTIa XPcIpkWgsD+RK8Lb46LAfYaQRSfgRO+Bk+5UDeQ0DMX67t/vgQgtd2Qz3SEXg07pdjW4Oju4E ojw1aKLSz7Fa1ZZTrEvqwltphvgLGW+5QcBeUZGkhCaOlfHmIWy6vvGU6LmWWj/YUlucHbikA FmN2G7pUvUxmO7rIwEnzCiuX20pfT2K5qN5eXPEpYdewG/5FdjIvnqcnc39xUMzEMqBA+7JJq WsU69N7MltWx5hUTJB95i4emZ6lfNanZ/VR1WQC8/9s5aQLSoyDDONIposX4SqYsg+lBlu0ws kfks7LflB7jRFTp3EGJKx26K7AZSTj/+ItnrHeuoKJHmixaOJRcNkkk5F/v6M+jio5fYikFTs JqF8SDom8qXYavKf23Hj+Cx2c/YN20WhAXr1L9KvgmIJoNDtHU= Subject: Re: What to do with bundled GD's version info? From: cmbecker69@gmx.de ("Christoph M. Becker") Hi Andrea! On 05.02.2018 at 03:35, Andrea Faulds wrote: > 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! I don't think this would be helpful, though, since GD 2.0 has been released around the millenium, and GD 2.0.1 has already been bundled with PHP since at least PHP 4.3.0. Therefore we can safely assume that nobody uses GD 1 anymore. After reconsideration, it seems to me that we simply can drop the GD_*_VERSION constants for the bundled libgd. Anybody who would using them in combination with the bundled GD is likely to have buggy code, anyway. The only sensible thing to do currently would be to check for `GD_BUNDLED` and to check the PHP version. I've submitted a respective PR: . -- Christoph M. Becker