2

I have 2 classes Helper and Movies.

I Helper i have a static method flats().

Now i need to use the flats() method inside my Movies class:

array_map(['Helper', 'flats'], $data);

But there error come:

Warning: array_map() expects parameter 1 to be a valid callback, class 'Helper' not found in bla bla on line xx

I have a PSR-4 autoloader, and the other Helper methods works great in the Movies class...

nutzt
  • 2,773
  • 3
  • 17
  • 26

0 Answers0