On Fri, 25 Jun 2021 at 08:26, Hamza Ahmad
wrote:
> To George
>
> > substring of the original string. And by that logic left and right are
> > actually linguistically incorrect due to languages being read Right to
> Left
> > or Top to Bottom.
>
> Thanks George for pointing out an important aspect
> #justsaying
Mike, most of the developers in PHP have their background from web
development, and they need easier solutions to their problems. As for
your suggestion of including all suggested names in the RFC, I shall
do this, too!
Like others, I do have a dream for PHP that it may become an ad
To George
> substring of the original string. And by that logic left and right are
> actually linguistically incorrect due to languages being read Right to Left
> or Top to Bottom.
Thanks George for pointing out an important aspect regarding the
choice of names. Will you consider a vote if there
> On Jun 24, 2021, at 8:04 AM, G. P. B. wrote:
>
> Moreover, the fact that only a very restricted number of programming
> languages, which are some of the earliest languages ever, implement those
> functions should tell you something about programming language design
> as a whole, which is that m
> I can also imagine bikeshed...
This is what can be discussed apart from whether these function come
to PHP. I am waiting for the other voices; there is surely someone
that can come up with a more creative name, a name that is short yet
descriptive.
> str_left_part/str_right_part is just what ca
On Thu, 24 Jun 2021 at 07:20, Hamza Ahmad
wrote:
> HI George,
>
> > I really don't see the point of these functions.
>
> These functions provide a clearer semantics for their usage.
Are they though? The naming doesn't convey anything as pointed out by Kamil.
> Substr,
> as Sara has mentioned
On 24.06.21 13:17, Kamil Tekiela wrote:
I am against adding these functions, but for different reasons than Sara
and George.
If we add str_left and str_right then there should be a corresponding
variant in mbstring. The byte-string functions are rarely useful. Adding
these functions to mbstring u
HI Kamil,
Thanks for the opinions. I have two questions:
1. Though it's true that naming choice is something to discuss about,
is it really a big issue that can prevent from these functions to be
introduced? We can ask both developers and user community about the
name choice.
2. Since my basic goa
On Thu, Jun 24, 2021 at 1:17 PM Kamil Tekiela wrote:
> I am against adding these functions, but for different reasons than Sara
> and George.
> If we add str_left and str_right then there should be a corresponding
> variant in mbstring. The byte-string functions are rarely useful. Adding
> these
I am against adding these functions, but for different reasons than Sara
and George.
If we add str_left and str_right then there should be a corresponding
variant in mbstring. The byte-string functions are rarely useful. Adding
these functions to mbstring unnecessarily complicates the extension for
On Thu, Jun 24, 2021 at 12:51 AM Sara Golemon wrote:
>
> [...] I'm
> not going to vote for it though, because it belongs in composer/packagist
> land, not in core. I've listed the reasons for this in the str_contains()
> threads, feel free to reference those, they're still valid and correct.
>
On Wed, Jun 23, 2021 at 11:54 PM Rowan Tommins
wrote:
> On 23/06/2021 22:28, Christoph M. Becker wrote:
> > substr() is about bytes, not characters. They all may have upvoted the
> > wrong answer. The only correct answer has just 17 upvotes.
>
>
> Just to out-pedant you, I'll point out that wha
To George, et al,
HI George,
> I really don't see the point of these functions.
These functions provide a clearer semantics for their usage. Substr,
as Sara has mentioned, can be an alternative to these functions. Does
it make clear that substr returns the either ends of a string? No,
substr ret
On Wed, Jun 23, 2021 at 2:10 PM Mike Schinkel wrote:
> I have frequently heard the justification of maintenance burden mentioned
> as an objection to adding specific features. And in many cases, it is easy
> to see why future maintenance burden would be a concern.
>
> However, it *seems* in this
On 23/06/2021 22:28, Christoph M. Becker wrote:
substr() is about bytes, not characters. They all may have upvoted the
wrong answer. The only correct answer has just 17 upvotes.
Just to out-pedant you, I'll point out that what most people would think
of as a "character" is neither a byte no
On 23.06.2021 at 21:10, Mike Schinkel wrote:
> Replying to both Sara's and G.P.B.'s emails below:
>
>> On Jun 23, 2021, at 12:48 PM, Sara Golemon wrote:
>>
>> Using some context, I would assume you mean this:
>>
>> function str_left(string $str, int $len): string {
>> return substr($str, 0, $len
Replying to both Sara's and G.P.B.'s emails below:
> On Jun 23, 2021, at 12:48 PM, Sara Golemon wrote:
>
> Using some context, I would assume you mean this:
>
> function str_left(string $str, int $len): string {
> return substr($str, 0, $len);
> }
>
> function str_right(string $str, int $len)
On Wed, Jun 23, 2021 at 6:49 PM Sara Golemon wrote:
> On Wed, Jun 23, 2021 at 9:15 AM Hamza Ahmad
> wrote:
>
> >
> > Since feature freeze for 8.1 is approaching, I want to request two useful
> > string functions that exist in various languages-especially those that
> run
> > on web servers and u
On Wed, Jun 23, 2021 at 9:15 AM Hamza Ahmad
wrote:
>
> Since feature freeze for 8.1 is approaching, I want to request two useful
> string functions that exist in various languages-especially those that run
> on web servers and used in databases. These are respectively `left();` and
> `right();`
>
On Wed, 23 Jun 2021 at 15:15, Hamza Ahmad
wrote:
> Hello Internals,
>
> Since feature freeze for 8.1 is approaching, I want to request two useful
> string functions that exist in various languages-especially those that run
> on web servers and used in databases. These are respectively `left();` a
20 matches
Mail list logo