Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97473 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13862 invoked from network); 27 Dec 2016 11:46:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Dec 2016 11:46:19 -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.217.172 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.217.172 mail-ua0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:36641] helo=mail-ua0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/AD-04761-A8452685 for ; Tue, 27 Dec 2016 06:46:18 -0500 Received: by mail-ua0-f172.google.com with SMTP id 88so176192051uaq.3 for ; Tue, 27 Dec 2016 03:46:18 -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:to; bh=jSOJx6YqZ4qRBeUtkA8xSsaV6r9grYSQt98iWcN/Mhw=; b=D1Um9g/ykTpQURRW997W6BaG/YCXr6uX4SLgRDxj+/62AzYnD20Fl7K+hghaBveKNg wU0I1qPg2OnSB7Nat+1/xzGuEASciumpNh7SkqocT+B8Z/dFfEn8G8qAt5f7wN1x1t7e vWszbDBU2cfieUhIZOcRfEd9rFvhIbXam3+nc0ulQVhNS5mkD7m2tbE+LGwhJQZ1pCQT TsuNR8HagirAO+pa6PxdYuhoseDF6atUrivANF7uyyl72A/9xdy5Y5G1151oVarSPUt2 3eIza3H6HoIHFUPxJHF4IHom9SBag48cVF6OsmQ8wyNE8tBtNjHaESatsH0fCSORJrLk AenQ== 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:to; bh=jSOJx6YqZ4qRBeUtkA8xSsaV6r9grYSQt98iWcN/Mhw=; b=s7Ukum5nlKM5nvYWVOpBSXEdj/X52x3d2La7FuA3pZUJgANDgTas++glT9JqFIo/mp y5asvq86OfNhUvcpYiglUUS9RpfgX6H4LRwMfw7D5ZUEurV8b5zGsmqUJ763kIGFOnBt jZmfPmW2hZMwdXD95V0nNM0aDqm8CMvu5ET8WWyYXgvcURi3fe16fIywFJB2zqbOZmoK Y0UJMesSbnoKkWgvIzdNYOBvXcuIL5xEncoFOBQNEJ9uru2/y7IyxLRRi+RkUrKWldmw UZogE7beQliMUr32SsotpftNg2m43QLiS1AqycUObA66Pel1IZToovwyu4qTRWyVtPe1 +XDg== X-Gm-Message-State: AIkVDXIB0h6uLrJRSsdz1qFSOYkMB81GuhMUZzgbKLKk6FZBpc/4guPR/vMq8JnfF8vLM/A+878Rf4pJxs+MJA== X-Received: by 10.176.83.148 with SMTP id k20mr24626723uaa.64.1482839175538; Tue, 27 Dec 2016 03:46:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.168.14 with HTTP; Tue, 27 Dec 2016 03:46:14 -0800 (PST) In-Reply-To: References: <753c3900-0d59-8d0d-3a53-863f42465b49@gmail.com> Date: Tue, 27 Dec 2016 14:46:14 +0300 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=f403045dd8fc512c7e0544a2669b Subject: Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 7.2 From: lisachenko.it@gmail.com (Alexander Lisachenko) --f403045dd8fc512c7e0544a2669b Content-Type: text/plain; charset=UTF-8 There was small typo in my previous link to object comparison: new one is https://3v4l.org/tMokY 2016-12-27 14:33 GMT+03:00 Alexander Lisachenko : > 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 >> >> > --f403045dd8fc512c7e0544a2669b--