I will try to explain what I want to accomplish with this method using an example:
You have an objectPerson
with the method getName()
which returns PersonName
.
Converting [PersonA, PersonB]
into [PersonNameA, PersonNameB]
.
I know PHP has a method array_column
to reach this with properties. But I am wondering if there is also a method to do this with objects' methods.