runkit_method_add Dynamically adds a new method to a given class &reftitle.description; boolrunkit_method_add stringclassname stringmethodname stringargs stringcode intflagsRUNKIT_ACC_PUBLIC &reftitle.parameters; classname The class to which this method will be added methodname The name of the method to add args Comma-delimited list of arguments for the newly-created method code The code to be evaluated when methodname is called flags The type of method to create, can be RUNKIT_ACC_PUBLIC, RUNKIT_ACC_PROTECTED or RUNKIT_ACC_PRIVATE optionally combined via bitwise OR with RUNKIT_ACC_STATIC (since 1.0.1) This parameter is only used as of PHP 5, because, prior to this, all methods were public. &reftitle.returnvalues; &return.success; &reftitle.examples; <function>runkit_method_add</function> example add(12, 4); ?> ]]> &example.outputs; &reftitle.seealso; runkit_method_copy runkit_method_redefine runkit_method_remove runkit_method_rename runkit_function_add