Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103874 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63098 invoked from network); 29 Jan 2019 10:59:03 -0000 Received: from unknown (HELO mail-ed1-f54.google.com) (209.85.208.54) by pb1.pair.com with SMTP; 29 Jan 2019 10:59:03 -0000 Received: by mail-ed1-f54.google.com with SMTP id f23so15171089edb.3 for ; Mon, 28 Jan 2019 23:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=42jVcMVz88meHJ5FJHzX1sJEu8pfnjuqaK2kg12zdlU=; b=UWkT+egSsER4LFlA9dHqRipXugyYj+ZvFc2JtGwANQFX9DRJjwEP1P/ruaZdU/cgN/ oEg39VtZ8frARyHllIN5i+o4L7/EbQtITHpFKp8C1gBQJ5qWD+zeLd3Z+yymW1L3w8Cj lS/VOc3nT+Cois/9klQ7COZ3FVFU0mTNirimYGDfzlJK+yxKa8F4BuwheTEJYIYQgtXE gkL3zAzzTNX1sRmK3Zx8heYEVRIRkYLoA1A3PRd1HvS88U1W+RIYE9lKMJY6IjZW88dn EJ9/8ZZvGUZCxZ/GzBRH+EyjgmPMpB0RZYi4BWjGdJZqZs+dUFdX0klM3j17bMb9ihJY Lk6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=42jVcMVz88meHJ5FJHzX1sJEu8pfnjuqaK2kg12zdlU=; b=g7PFMEL2JUSP9EuV1FEtjTVge1iYMKcYxHXfLdNQnFGgVjcUI9rEEFPjdiLqGwszMZ chSHs0i8DKV1y4lxnIAFjlcUkn9OmuN6Caz/bj0CVsjfYXrg8K967qTD/7w3I+I52bQP Kap7UB2Rtd0D3fSnjobkloqZH15V4HfCDTrT0bCin6xMbjxNTuPUvThDf7+P2Bat23jZ CQxIdMd55LRURV/rHCFE4Yku8/rmdbPp0RvMWHkd4S5TiphqASG+cMiawzicqNHJYkcB vXJePRnI0ydXOhJqZY1S+f12TmYFogAPukiPhDmSCUTmGxULBMHHZ+8O/ORL57EGn8z2 wZNg== X-Gm-Message-State: AJcUukfwQnFkQPDNyH/A/u6ql+KjkzAXx56lAkG6cl41NQKnSkarRBBN SSTYCSkCxfIREU0D0CfjPL+DrhvxU78= X-Google-Smtp-Source: ALg8bN5vqO+UkJCH79T3Q36lzeBcA0DMKHmYFnfCuxAdm1Pggqd8+Sz3BmQu+ZoBugUejfkkEwGdww== X-Received: by 2002:a17:906:b3cc:: with SMTP id cg12mr15984147ejb.219.1548747502638; Mon, 28 Jan 2019 23:38:22 -0800 (PST) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id r8sm13617282edo.11.2019.01.28.23.38.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 23:38:21 -0800 (PST) Message-ID: <0CA68783-C741-4F86-AC74-CF366CCA9407@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_6BC3E112-9348-4818-8618-D707BBCDC613" Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Date: Tue, 29 Jan 2019 08:38:20 +0100 In-Reply-To: Cc: Dan Ackroyd , Rowan Collins , Benjamin Morel , Thomas Hruska , PHP Internals To: Girgias References: X-Mailer: Apple Mail (2.3445.102.3) Subject: Re: [PHP-DEV] Deprecation ideas for PHP 8 From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_6BC3E112-9348-4818-8618-D707BBCDC613 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >=20 > And then there is *array_multisort* a function which has a signature = which > isn't even possible in userland code. > (https://secure.php.net/manual/en/function.array-multisort.php = ). > Other than the fact that this function's documentation isn't totally > correct in my opinion I did a Github search to see if people use it. > =46rom what I've seen in the search results [1], around 620k, it is = only used > in phpt unit tests and a unit test of a parser. >=20 > [1] > = https://github.com/search?l=3DPHP&o=3Ddesc&p=3D1&q=3Darray_multisort&s=3D&= type=3DCode = >=20 Presumably, if you sort the results by =E2=80=9DBest match=E2=80=9D, = test units appear first because they are the only occasions where you = invoke this function ten times in a row. Try to sort by =E2=80=9DRecently = indexed=E2=80=9D and you=E2=80=99ll get some real usages. > Now, I don't think a function which doesn't follow normal function > signature converntion (or isn't even possible) shouldn't really be = part of > the language. > Moreso that it seems barely anybody uses it. > What's people opinion on deprecating array_multisort ? One of the most important things to consider when proposing deprecations = is the migration cost you impose to your users. It is apparently = something easily forgotten by those that love deprecations : =E2=80=9CIn = order to make migrating your legacy code even more painful, we have = carefully chosen to deprecate a function that you=E2=80=99ll have = trouble to reimplement userland.=E2=80=9D Moreover, even when assuming (incorrectly) that it is barely used: What = is the benefit of deprecating array_multisort? (This question is valid = also for future deprecation proposals.) =E2=80=94Claude= --Apple-Mail=_6BC3E112-9348-4818-8618-D707BBCDC613--