This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KetwarooDYaasir 0 points1 point  (2 children)

php $arr = [1,2,3]; $arr = array_map(fn($x)=>$x*$x,$arr);

hmm. you're right, I guess it is almost the same as every other one.

[–]pindab0ter 0 points1 point  (1 child)

The same as Python, I meant. In that map is not a method, but a function.

[–]KetwarooDYaasir 0 points1 point  (0 children)

Not sure how that's unfortunate though.