>
> If one can easily use a function incorrectly in a way that is not
> *immediately* apparent, then I consider the function to be badly
> designed.
>
Does that philosophy also cover preg_quote()? I've lost count of the
number of times that I've seen it used in Stack Overflow answers without a
hat null values inside of an array
are happily coerced to strings inside of the aforementioned functions, but
null is not consumable if singularly passed in.
Some examples for context: https://3v4l.org/ENVip
I look forward to hearing feedback/concerns.
Mick
mickmackusa
I want to ask about a quirk that I happened upon. In truth, I expected my
code to fail with a fatal error, but it turns out that while using array
destructuring in the head of a foreach() loop it is permitted to declare
new elements if the value is a reference.
Is this a bug or an intended
>
> Voting is now closed. mb_trim, mb_ltrim and mb_rtrim of result is yes:15,
> no:0.
> I will soon change from draft pull request
> (https://github.com/php/php-src/pull/12459) to normal pull request.
>
> Regards
> Yuya.
>
>
Hi Yuya,
Can you please clear up some ambiguity for me regarding
belief that the different syntaxes only mattered when
echoing.
$x = 0;
$array1[1] = 43;
$array1[++$x] ??= 42;
var_dump($x, $array1);
echo "\n---\n";
$y = 0;
$array2[0] = 43;
$array2[$y++] ??= 42;
var_dump($y, $array2);
Thanks Ilija
mickmackusa
than using concatenation. I don't see anything ugly or
unreadable about building two flat arrays, then using them to construct a
SQL string and feed the execute() method. https://phpize.online/s/iW
I am not an RFC voter, but I don't really see a compelling reason to add
this method to the language.
mickmackusa
(increment a counter), concatenate
another column (or columns), or otherwise mutate the encountered row in
each group.
Have you considered the extendability of your pitched function? Without
these extra considerations, devs would need to make another pass over the
new nested structure.
mickmackusa
>
>
> * Are integer keys preserved? I'm assuming no, as otherwise it would
> be the same as `$a + $b`.
>
> $arr[...] = $arr;
> should be the same as
> foreach ($arr as $v) { $arr[] = $v; }
>
> all other answers should be answered from this and consistency
Since `$arr1[...] = $arr2;` should be
not yet sold on this new/strange implementation of the spread operator.
Mick Harner
mickmackusa
ly, make a habit of implementing the spaceship
operator (<=>). See "array_uintersect() gives unexpected results when
callback only returns 0 or 1" @ https://stackoverflow.com/q/8176881/2943403
Another example:
https://stackoverflow.com/a/71049380/2943403
The deep dive: https://stackoverflow.com/a/70817582/2943403
mickmackusa
a new property of the datetime object?
To programming purists who hate generating notices and warnings, this
probably feels like a wart on the language.
Please enlighten me.
mickmackusa
On Monday, July 25, 2022, Guilliam Xavier wrote:
> On Sat, Jul 9, 2022 at 1:56 AM mickmackusa wrote:
>
>> I've discovered that several native string functions offer a character
>> mask
>> as a parameter.
>>
>> I've laid out my observations at
>> ht
>
>
>
If I seek to have a round of voting for an RFC on character ranges in
character mask parameters, should I propose it for PHP8.3 or a higher
version?
I have only identified 4 native string functions that make reasable
candidates to join the 7 existing functions with this feature.
I don't
re is also a `trim`, `ltrim` and `rtrim` functions
>
> >Суббота, 9 июля 2022, 2:56 +03:00 от mickmackusa :
> >
> >I've discovered that several native string functions offer a character
> mask
> >as a parameter.
> >
> >I've laid out my observations at
> >
example (not just as a user comment at the bottom; this isn't In-N-Out
Burger -- put your offerings on the frickin' menu!).
mickmackusa
On Sun, Apr 24, 2022 at 10:24 PM Rowan Tommins wrote:
>
> On 23/04/2022 23:42, mickmackusa wrote:
> > Ideally, PHP should have a native transposing function to put
> > developers out of their misery -- much like array_key_last() did.
>
>
> I think a better compa
matrix in C++?
Transpose/Unzip Function (inverse of zip)?
Transposing a 2D-array in JavaScript
An efficient way to transpose a file in Bash
Java: Multi-dimensional array transposing
mickmackusa
p.s. I've been told that I'll need a sprinkling of karma if I am going
to submit an RFC, so please shout me so
17 matches
Mail list logo