I have a function which sorts data in a multidimensional array, as shown below:
\"James\");
One thing to consider is that if the variable is passed to your method by reference, usort() appears to execute in the context of the referenced variable and not your current method. Therefore, you need to provide the full namespace in your class reference like so:
usort($data, ['My\NameSpace\MyClass', 'order_new']);