Skip to content

Allow Disabling Class Methods via disable_methods in php.ini #22866

Description

@chopins

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'));

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions