Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:106180
Return-Path: <zeev@php.net>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 75875 invoked from network); 8 Jul 2019 19:37:11 -0000
Received: from unknown (HELO tbjjbihbhebb.turbo-smtp.net) (199.187.174.11)
  by pb1.pair.com with SMTP; 8 Jul 2019 19:37:11 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.net;
	s=turbo-smtp; x=1563209797; h=DomainKey-Signature:Received:
	Received:MIME-Version:References:In-Reply-To:From:Date:
	Message-ID:Subject:To:Cc:Content-Type; bh=50RkN2fK+HUXoMknpjlyc/
	1DBV4MX63dJlh3RvH1VZ0=; b=J2DIkLqNVBNY5hXT5kEsJf1R7z0HBexJBXrj6N
	kkl2GFYq8jPpgPAb7Z6ep4Rh45DXiCPgi+/WZs1diLHnLTIlS4D8VtTTN6VTMVfN
	5OxQG4ZYPztZCuZS5rDb98kX20g+0+LqygmvVchHNsYEe+tCY1KOWpQVuTxjzxYQ
	tXC4s=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
	s=turbo-smtp; d=php.net;
	h=Received:Received:X-TurboSMTP-Tracking:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version:References:In-Reply-To:From:Date:X-Gmail-Original-Message-Id:Message-ID:Subject:To:Cc:Content-Type;
	b=WrEWhYGVpVZ9XozcodEJ3ACfeLyDRmgCulhT8Jtj2VULv2VSDr7Er/58NPstSQ
	y07saCes3btA+wHjaIe/sDN/N3PN/o/6rkgMdtsDHuXtSxHgEviukZ6xTOQITyEo
	FngydjQxkQSaGGMo2eJaAe+u5VJGqrIDljGW0qxxKubsA=;
Received: (qmail 13889 invoked from network); 8 Jul 2019 16:56:37 -0000
Received: 
X-TurboSMTP-Tracking: 5147236210
X-Gm-Message-State: APjAAAXptV/kC0VWLBN5XioIV+SjB3wGZEuYDW4OeUAUVqls8cN6n5Kt gsgQUwSU3yChtyk0lE/4VXsCtvIQE4DAQGkA2Cs=
X-Google-Smtp-Source: APXvYqyfwIEzt+QwuiKtGyDZK/eleTX0Joa+ve7RG15lcXet+UyP2KmEhicVesJYpWvZI2eaIype9FJ4xSFndY7wvTU=
X-Received: by 2002:a37:ad0f:: with SMTP id f15mr14902626qkm.68.1562604996730; Mon, 08 Jul 2019 09:56:36 -0700 (PDT)
MIME-Version: 1.0
References: <CAJW__o0GLjcagzF0ZpEK54yyhkFpgV6tm4p+ihnZvv-dC3YFUQ@mail.gmail.com> <09a8bba3-d17a-a8e5-f9b7-cc3d65f1e66c@gmail.com> <e67ff0b8-faba-9423-8ef1-69910eea6520@gmail.com> <CAF+90c-6ssx7ZXS34D4mUjE98PSnOqd6RvGuQes+xLhN0r-2rA@mail.gmail.com> <CAF+90c9pRX5LWpo=HOyXaHPapsWJn4vB5DCjOXx8JXOF-vmWkA@mail.gmail.com> <CAJHtznwRQnd36p1Yk51g5mYyXSeWRpvdMmFWv4d15LKUDHWO1Q@mail.gmail.com> <CAF+90c8ZccyA-qAQvMzrKB6WEUQ_ZpX_p=GPjt44-t65xmMCTg@mail.gmail.com> <CAJHtznz_u5VsaW+UFAoHwsuUuyB9U+DdKK7iPH1U3MYBxApcQw@mail.gmail.com> <CAF+90c-c0WE55zoWiTUWvYyh71LBYAxVoyg1jnJZp+QiDEd4ZQ@mail.gmail.com>
In-Reply-To: <CAF+90c-c0WE55zoWiTUWvYyh71LBYAxVoyg1jnJZp+QiDEd4ZQ@mail.gmail.com>
Date: Mon, 8 Jul 2019 19:56:25 +0300
X-Gmail-Original-Message-Id: <CAJHtznyPnACWqkmsU86bnbcaQDTq7JL07kFgc4RraymnRrE81A@mail.gmail.com>
Message-ID: <CAJHtznyPnACWqkmsU86bnbcaQDTq7JL07kFgc4RraymnRrE81A@mail.gmail.com>
To: Nikita Popov <nikita.ppv@gmail.com>
Cc: Stanislav Malyshev <smalyshev@gmail.com>, Kalle Sommer Nielsen <kalle@php.net>,  Internals <internals@lists.php.net>
Content-Type: multipart/alternative; boundary="000000000000c12726058d2e53dc"
Subject: Re: [PHP-DEV] [RFC] Deprecations for 7.4 - specifics
From: zeev@php.net (Zeev Suraski)

--000000000000c12726058d2e53dc
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 8, 2019 at 5:37 PM Nikita Popov <nikita.ppv@gmail.com> wrote:

>
> I'm certainly not a domain expert in RTL languages. I'd be happy to drop
> hebrev() from this RFC if someone can bring forward a good technical
> argument as to why these functions are still necessary and where they wou=
ld
> be used.
>

I do insist you have it backwards - you need a good technical argument as
to why these functions should be removed - i.e., what negative value do
they bring to the table that would be sorted out by their elimitation
(which could even be "pushing people towards using something that I
consider better", but even that is not available).  This is key, and went
completely ignored.

That said:


> However, and given your comment here I may have just missed this between
> other mail, I have not actually seen any technical argument on this topic=
.
> The only thing I found was a namedrop of "IBM i" without any explanation =
of
> the significance this has for Hebrew text or the hebrev() function
>

IBM i is not a namedrop at all.  Basically, any platform that has no
built-in RTL support (IBM i being one of them, there are many more) would
benefit from hebrev().  As a matter of fact, I just recalled that this is
even useful under Windows (I used it myself a few months ago and forgot
about it) - as the Windows shell doesn't render logical Hebrew either.  For
instance, if you have the following files in C:\somedir:

C:\somedir\=D7=A0=D7=99=D7=A7=D7=99=D7=98=D7=94
C:\somedir\=D7=A7=D7=90=D7=9C

(that's Nikita and Kalle)

The following script:
----
<?php
$d =3D opendir("c:\\somedir");
while ($f =3D readdir($d)) {
        print "$f\n";
}
---

Would generate the following output:
https://www.dropbox.com/s/tjs8jwypmy7nvay/Hebrew%20Logical.PNG?dl=3D0

When fixed with hebrev():
----
<?php
$d =3D opendir("c:\\somedir");
while ($f =3D readdir($d)) {
        print hebrev($f)."\n";
}
---

It will display the correct output:
https://www.dropbox.com/s/wss5fswd9gqj5vk/Hebrew%20Visual.PNG?dl=3D0

I'm *almost* sure that you'd get the same results on Linux.

Simply put - hebrev() is super useful for CLI apps.

The fact it's nowadays thankfully uncommon for HTML to be based on visual
encodings, doesn't mean visual representations have disappeared.  They're
still there in all sorts of legacy situations - including legacy scenarios
in modern OSs (the above is from Windows 10 1903).

(To be clear: I'm not interested in whether it's still used, I'm interested
> whether it's still used *for good reason*.)
>

If it's still being used, it's almost definitely being used for a good
reason.  Nobody uses hebrev() to knock themselves out or because they take
some sort of perverted pleasure out of it.  They use it because they have
to.  And what you're proposing is taking that capability away, providing
zero workarounds, and gaining absolutely nothing in the process.

Why?

Zeev

--000000000000c12726058d2e53dc--