Description
Whether it is necessary to have a php.ini configuration directive to disable class methods, similar to the disable_functions and disable_classes directives, by adding a new disable_methods=ClassName1::MethodName,ClassName2::MethodName2?
The following is an example of disabling a class method (ReflectionMethod::getStaticVariables()) via the FFI extension:
$mtptr = \FFI::addr($ffi->reflection_method_ptr->function_table);
$ffi->zend_hash_str_del($mtptr, "getstaticvariables", strlen('getstaticvariables'));
Description
Whether it is necessary to have a php.ini configuration directive to disable class methods, similar to the
disable_functionsanddisable_classesdirectives, by adding a newdisable_methods=ClassName1::MethodName,ClassName2::MethodName2?The following is an example of disabling a class method (
ReflectionMethod::getStaticVariables()) via the FFI extension: