I've noticed recently in PHP you can do this.
$myNewArray = $oldArray + $someArray;
This looks completely different to anything I've seen before involving manipulating arrays in PHP.
How and why does it work? Are there any pitfalls?
I have recently started using it in some places where I may have used array_unshift()
and array_merge()
.