[php-src] Issue #22866: Allow Disabling Class Methods via disable_methods in php.ini

From: Date: Thu, 23 Jul 2026 03:12:36 +0000
Subject: [php-src] Issue #22866: Allow Disabling Class Methods via disable_methods in php.ini
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-252477@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/22866 Author: 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: ```php $mtptr = \FFI::addr($ffi->reflection_method_ptr->function_table); $ffi->zend_hash_str_del($mtptr, "getstaticvariables", strlen('getstaticvariables')); ```

« previous php.bugs (#252477) next »