What is the difference between calling a method directly and using call_user_func in PHP?
Calling a method directly in PHP involves specifying the object instance followed by the method name and parentheses. On the other hand, using `call_user_func` allows you to dynamically call a method by passing the object instance and method name as arguments. This can be useful in situations where the method name is stored in a variable or needs to be determined at runtime.
// Calling a method directly
$object = new ClassName();
$object->methodName();
// Using call_user_func
$object = new ClassName();
call_user_func([$object, 'methodName']);