Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97472 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12176 invoked from network); 27 Dec 2016 11:33:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Dec 2016 11:33:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.50 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.213.50 mail-vk0-f50.google.com Received: from [209.85.213.50] ([209.85.213.50:36696] helo=mail-vk0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/4D-04761-D8152685 for ; Tue, 27 Dec 2016 06:33:34 -0500 Received: by mail-vk0-f50.google.com with SMTP id p9so208682629vkd.3 for ; Tue, 27 Dec 2016 03:33:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=gOmZRHIPIMsbFyFIOz/nkNS2jFpzeDDCE99Ve163GPg=; b=tcYgGdaGIl6eKUI/AoQoU67xgnpsSpRtQvRj8ndbzqhGobIyTqCRFXhGRA8DbwLFGk G/jCEFHzaMySEB0tEQVY5E0Q3br/dJQT3DBfB1z8q5S52OYU4cjmf2sY9bz873fPp8iD wNUGtwBNV/SHOmFD00e9phT5Do1szpt/91tE+SH1JzpqjwfyDVPPd79vS2iLm9vN2Ee6 1I+124Hiv9XZ8seKTsA396nvD794nHzwBUaXBq1I6XcPBFVtMcyhIZAX44NZS8rdSogM hN+ABtcx1eEq6xp0KBaHj9tDCm90IIDD86eALTvkt73FYAGK9tmx93LSLbZ1stBpGTTw SVPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=gOmZRHIPIMsbFyFIOz/nkNS2jFpzeDDCE99Ve163GPg=; b=XNdH6F5QidZnJJrhJrWDCwyEP3cvkWUsJPF8uoEcGgDLzectHBhJOZMYg5JYeift29 BDn1Dyf8Sx+HVnQPhDjO/q6WY4T2bOKOkyeouMzcuoNwa/Em0fZiD3lRyn3Nejazwa59 ys74dOCsk5aCTGxtMb9DdJAUGDp8p3EntIQ9ZIth5GtvcbxMaym4vl2oY2lrDVU2jSRk OwFT8pPW/eGJ4mOTCDDZK4gWR7pisdEI8fad/pfF2yNTfuIoa6+mophDVLCzCOsCQ32I 4tx1Iuh3SKYtvjBrq1QXVwIKQSrnxiSn8d69uHZpjKVEFfTb853hVSfMaDcYphHWGZyk bGJg== X-Gm-Message-State: AIkVDXI07jJO50aGDvkpfcHgl8UiYkCn8PpErH9fgnxiEEN+W4V6PFUCUVSbPHyTN4mZQcqkmxHuOpz8+P4dcA== X-Received: by 10.31.158.81 with SMTP id h78mr11413331vke.34.1482838409942; Tue, 27 Dec 2016 03:33:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.168.14 with HTTP; Tue, 27 Dec 2016 03:33:29 -0800 (PST) In-Reply-To: <753c3900-0d59-8d0d-3a53-863f42465b49@gmail.com> References: <753c3900-0d59-8d0d-3a53-863f42465b49@gmail.com> Date: Tue, 27 Dec 2016 14:33:29 +0300 Message-ID: Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11427400af1d160544a238e8 Subject: Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 7.2 From: lisachenko.it@gmail.com (Alexander Lisachenko) --001a11427400af1d160544a238e8 Content-Type: text/plain; charset=UTF-8 Hi, internals! I want to propose to deprecate one more weird feature of PHP called "comparison of different types" http://php.net/manual/en/language.operators.comparison.php#language.operators.comparison.types. Here you can check one simple example https://3v4l.org/kCOAf to see why it should be deprecated. It would be nice to deprecate all comparison operators between different types and throw an exception later in future version of PHP. Operators that should be allowed for comparison of different types are the following: ==, !=, ===, !==, <>. Operators to deprecate for comparison of different types are the following: >, <, >=, <=, <=> I also think about deprecation of string/object/array comparison with operators like greater/less, because it's hard to understand results for '1000' < '0xabc1' (see https://3v4l.org/o3iLj) or even object comparison https://3v4l.org/5At1l Thanks! 2016-12-27 9:52 GMT+03:00 Stanislav Malyshev : > Hi! > > >> https://wiki.php.net/rfc/deprecations_php_7_2 > > Reading through the list, I find several categories: > > Completely ok: > > (unset) - don't see any sane use case anyway > gmp_random > > Can cause breakage but it's ok: > > $php_errormsg > __autoload > mbstring.func_overload > parse_str() - people can use it in functions, it doesn't have to be > globals. But it's cleaner with second arg. > $errcontext > > Don't see a reason to remove: > > (binary) cast and b"" - yes, they are not currently doing anything. But > they don't also hurt anything. > > High breakage potential: > > each() - I've seen a lot of code using each. Yes, it's not the best way. > A lot of people write code not in absolutely best way but in a way they > like to. Argument about list() proposed in RFC makes little sense to me > - since problem is with list() and not each() why each() should be > deprecated because of it? And I certainly object its removal. > > create_function() - yes, there are closures now. But there's a lot of > code created when there were none, and that code works, and there's no > reason to break it. I'd probably be OK with deprecation warning but not > with removal. > > Special case: > assert() - if the string arg is a security issue, deprecating it > achieves nothing. So I'm not sure I understand the argument for > deprecation - if string assert is a problem we probably should make > assert() construct instead check if assert is used in eval form, not by > argument count? > > -- > Stas Malyshev > smalyshev@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11427400af1d160544a238e8--